You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
(886) |
Apr
(141) |
May
(30) |
Jun
(86) |
Jul
(23) |
Aug
(33) |
Sep
|
Oct
(21) |
Nov
(30) |
Dec
(811) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(184) |
Feb
(137) |
Mar
(519) |
Apr
(1298) |
May
(180) |
Jun
(71) |
Jul
(35) |
Aug
(90) |
Sep
(48) |
Oct
(86) |
Nov
(159) |
Dec
(55) |
| 2009 |
Jan
(57) |
Feb
(60) |
Mar
(53) |
Apr
(43) |
May
(32) |
Jun
(89) |
Jul
(83) |
Aug
(47) |
Sep
(74) |
Oct
(88) |
Nov
(72) |
Dec
(56) |
| 2010 |
Jan
(33) |
Feb
(20) |
Mar
(17) |
Apr
|
May
(3) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(66) |
Oct
(16) |
Nov
(6) |
Dec
(11) |
| 2011 |
Jan
(6) |
Feb
|
Mar
(49) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(62) |
Nov
(4) |
Dec
(1) |
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(81) |
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
(3) |
| 2013 |
Jan
(8) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(33) |
Jun
(8) |
Jul
|
Aug
|
Sep
(76) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
(17) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
|
3
|
|
4
|
5
|
6
|
7
|
8
|
9
(1) |
10
|
|
11
(2) |
12
|
13
(19) |
14
|
15
(4) |
16
(20) |
17
|
|
18
|
19
(9) |
20
(14) |
21
(10) |
22
(796) |
23
(4) |
24
|
|
25
|
26
|
27
(7) |
28
|
29
|
30
|
31
|
|
From: Matt <mat...@us...> - 2007-03-27 10:55:57
|
Update of /cvsroot/openqrm/plugins/sample/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24434/plugins/sample/include Modified Files: sample-info.xml Log Message: removed wrong rpm relations Index: sample-info.xml =================================================================== RCS file: /cvsroot/openqrm/plugins/sample/include/sample-info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sample-info.xml 16 Mar 2007 16:49:41 -0000 1.1 --- sample-info.xml 27 Mar 2007 10:55:24 -0000 1.2 *************** *** 35,43 **** <description>This is the sample plug-in for openQRM</description> </module> - <relation> - <module>qrm-core</module> - <version>=1.0.0</version> - <require>true</require> - <install>before</install> - </relation> </package> --- 35,37 ---- |
|
From: Matt <mat...@us...> - 2007-03-27 10:55:57
|
Update of /cvsroot/openqrm/plugins/xen/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24434/plugins/xen/include Modified Files: xen-info.xml Log Message: removed wrong rpm relations Index: xen-info.xml =================================================================== RCS file: /cvsroot/openqrm/plugins/xen/include/xen-info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xen-info.xml 9 Mar 2007 09:22:13 -0000 1.1 --- xen-info.xml 27 Mar 2007 10:55:22 -0000 1.2 *************** *** 35,43 **** <description>Provides Xen integration in openQRM</description> </module> - <relation> - <module>qrm-core</module> - <version>=1.0.0</version> - <require>true</require> - <install>before</install> - </relation> </package> --- 35,37 ---- |
|
From: Matt <mat...@us...> - 2007-03-27 10:55:56
|
Update of /cvsroot/openqrm/plugins/vserver/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24434/plugins/vserver/include Modified Files: vserver-info.xml Log Message: removed wrong rpm relations Index: vserver-info.xml =================================================================== RCS file: /cvsroot/openqrm/plugins/vserver/include/vserver-info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vserver-info.xml 9 Mar 2007 09:22:03 -0000 1.1 --- vserver-info.xml 27 Mar 2007 10:55:24 -0000 1.2 *************** *** 35,43 **** <description>Provides Linux-VServer integration in openQRM</description> </module> - <relation> - <module>qrm-core</module> - <version>=1.0.0</version> - <require>true</require> - <install>before</install> - </relation> </package> --- 35,37 ---- |
|
From: Matt <mat...@us...> - 2007-03-27 10:55:56
|
Update of /cvsroot/openqrm/plugins/webmindhcpd/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24434/plugins/webmindhcpd/include Modified Files: webmindhcpd-info.xml Log Message: removed wrong rpm relations Index: webmindhcpd-info.xml =================================================================== RCS file: /cvsroot/openqrm/plugins/webmindhcpd/include/webmindhcpd-info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** webmindhcpd-info.xml 20 Mar 2007 13:42:29 -0000 1.1 --- webmindhcpd-info.xml 27 Mar 2007 10:55:24 -0000 1.2 *************** *** 35,43 **** <description>Provides configuration for the dhcpd-plugin via Webmin</description> </module> - <relation> - <module>qrm-core</module> - <version>=1.0.0</version> - <require>true</require> - <install>before</install> - </relation> </package> --- 35,37 ---- |
|
From: Matt <mat...@us...> - 2007-03-27 10:55:56
|
Update of /cvsroot/openqrm/plugins/webmin/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24434/plugins/webmin/include Modified Files: webmin-info.xml Log Message: removed wrong rpm relations Index: webmin-info.xml =================================================================== RCS file: /cvsroot/openqrm/plugins/webmin/include/webmin-info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** webmin-info.xml 19 Mar 2007 16:05:17 -0000 1.1 --- webmin-info.xml 27 Mar 2007 10:55:24 -0000 1.2 *************** *** 35,43 **** <description>Provides Webmin integration in openQRM</description> </module> - <relation> - <module>qrm-core</module> - <version>=1.0.0</version> - <require>true</require> - <install>before</install> - </relation> </package> --- 35,37 ---- |
|
From: Matt <mat...@us...> - 2007-03-27 10:55:39
|
Update of /cvsroot/openqrm/plugins/puppet/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24434/plugins/puppet/include Modified Files: puppet-info.xml Log Message: removed wrong rpm relations Index: puppet-info.xml =================================================================== RCS file: /cvsroot/openqrm/plugins/puppet/include/puppet-info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** puppet-info.xml 9 Mar 2007 09:21:59 -0000 1.1 --- puppet-info.xml 27 Mar 2007 10:55:24 -0000 1.2 *************** *** 35,43 **** <description>Provides configuration-management via Puppet for the managed nodes</description> </module> - <relation> - <module>qrm-core</module> - <version>=1.0.0</version> - <require>true</require> - <install>before</install> - </relation> </package> --- 35,37 ---- |
|
From: Matt <mat...@us...> - 2007-03-27 10:55:39
|
Update of /cvsroot/openqrm/plugins/qemu/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24434/plugins/qemu/include Modified Files: qemu-info.xml Log Message: removed wrong rpm relations Index: qemu-info.xml =================================================================== RCS file: /cvsroot/openqrm/plugins/qemu/include/qemu-info.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** qemu-info.xml 9 Mar 2007 09:21:59 -0000 1.1 --- qemu-info.xml 27 Mar 2007 10:55:24 -0000 1.2 *************** *** 35,43 **** <description>Provides Qemu integration in openQRM</description> </module> - <relation> - <module>qrm-core</module> - <version>=1.0.0</version> - <require>true</require> - <install>before</install> - </relation> </package> --- 35,37 ---- |
|
From: Matt <mat...@us...> - 2007-03-23 04:36:51
|
Update of /cvsroot/openqrm/plugins/vserver/build In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19799/plugins/vserver/build Modified Files: vserver.conf Log Message: fixes for the vserver plugin Index: vserver.conf =================================================================== RCS file: /cvsroot/openqrm/plugins/vserver/build/vserver.conf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vserver.conf 9 Mar 2007 09:21:42 -0000 1.1 --- vserver.conf 23 Mar 2007 04:36:50 -0000 1.2 *************** *** 31,34 **** --- 31,38 ---- FILE="util-vserver-0.30.211.tar.bz2" + QRM_CONFIGURE_OPTIONS="--prefix=/var/qrm/plugins/vserver/ " + QRM_POST_MAKE_CMD="make install" + QRM_MAKE_OPTIONS="" + # urls SOURCE="http://ftp.linux-vserver.org/pub/utils/util-vserver/$FILE" |
|
From: Matt <mat...@us...> - 2007-03-23 04:36:50
|
Update of /cvsroot/openqrm/plugins/vserver In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19799/plugins/vserver Modified Files: Makefile Log Message: fixes for the vserver plugin Index: Makefile =================================================================== RCS file: /cvsroot/openqrm/plugins/vserver/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 9 Mar 2007 09:21:52 -0000 1.1 --- Makefile 23 Mar 2007 04:36:50 -0000 1.2 *************** *** 67,71 **** @echo "make mrproper" > $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre @echo "make clean" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre ! . $(PACKAGE_CONFIG_FILE_VSERVER_PATCH) && echo "/bin/cp -f $(QRM_CACHE_DIR)/src/$$FILE $(QRM_ROOT_DIR)/qrm-vserver-patch.diff.bz2" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre @echo "/bin/rm -f $(QRM_ROOT_DIR)/qrm-vserver-patch.diff" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre @echo "bunzip2 $(QRM_ROOT_DIR)/qrm-vserver-patch.diff.bz2" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre --- 67,71 ---- @echo "make mrproper" > $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre @echo "make clean" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre ! . $(PACKAGE_CONFIG_FILE_VSERVER_PATCH) && echo "/bin/cp -f $(QRM_CACHE_DIR)/$$FILE $(QRM_ROOT_DIR)/qrm-vserver-patch.diff.bz2" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre @echo "/bin/rm -f $(QRM_ROOT_DIR)/qrm-vserver-patch.diff" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre @echo "bunzip2 $(QRM_ROOT_DIR)/qrm-vserver-patch.diff.bz2" >> $(QRM_ROOT_DIR)/qrm-vserver-kernel-2.6.pre |
|
From: Matt <mat...@us...> - 2007-03-23 04:35:30
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/webapp/views/tags In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19421/base/openqrm-3.1.4/src/base/java/main/webapp/views/tags Added Files: tags.jsp tag_config.jsp tags_int.jsp tag_config_int.jsp Log Message: missing files --- NEW FILE: tags_int.jsp --- <%-- The contents of this file are subject to the Qlusters Public License Version 1.1 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.openqrm.org/content/view/33/69/. Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is openQRM. The Initial Developer of the Original Code is Qlusters Corporation. Portions created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights Reserved. Contributor(s): Description: Comments: --%> <%@include file="../../include/content.inc"%> <%@include file="/menus/definitions/tags/tag_tools.jsp" %> <c:forEach items="${tags.tags}" var="tag"> <%@include file="/menus/definitions/tags/tag_actions.jsp" %> </c:forEach> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr class="h1Row"> <td width="100%"><h1>Tags Management</h1></td> <td width="80"> <jlmenu:body id="tag_tools"/> </td> </tr> <html-el:form method="post" action="/action/tags.do"> <input type="hidden" name="sorter.column" id="sort" value="<c:out value="${tags.sorter.column}"/>"/> <input type="hidden" name="sorter.order" id="order" value="<c:out value="${tags.sorter.order}"/>"/> <input type="hidden" name="paging.currentRecord" id="currentRecord" value="<c:out value="${tags.paging.currentRecord}"/>"/> <input type="hidden" name="paging.numRecords" id="numRecords" value="<c:out value="${tags.paging.numRecords}"/>"/> </html-el:form> <tr> <td height="30" colspan="2"><c:out value="${tags.paging.numRecords}"/> records found<c:if test="${tags.tags.size > 0}">, showing <c:out value="${tags.paging.currentRecord + 1}"/>-<c:out value="${tags.paging.currentRecord + tags.tags.size}"/></c:if>.</td> </tr> <tr> <td colspan="2"> <c:if test="${tags.tags.size > 0}"> <html-el:form method="post" action="/action/tag_control"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="dataTable"> <tr class="dataTableHeader"> <td width="1%" title="Check/Uncheck all"><input type="checkbox" /></td> <td width="40%" class="sortable" >Name <c:choose> <c:when test="${tags.sorter.column == 'name'}"> <c:choose> <c:when test="${tags.sorter.order == '1'}"><img src="../../images/sort_up.gif"/></c:when> <c:otherwise><img src="../../images/sort_down.gif"/></c:otherwise> </c:choose> </c:when> </c:choose> </td> <td width="60%" class="sortable" >Description <c:choose> <c:when test="${tags.sorter.column == 'description'}"> <c:choose> <c:when test="${tags.sorter.order == '1'}"><img src="../../images/sort_up.gif"/></c:when> <c:otherwise><img src="../../images/sort_down.gif"/></c:otherwise> </c:choose> </c:when> </c:choose> </td> <td> </td> </tr> <c:forEach items="${tags.tags}" var="tag" varStatus="c"> <tr<c:if test="${c.count % 2 == 0}"> class="tableEven"</c:if>> <%-- tags data --%> <td width="1%"><html-el:multibox property="deletedIds" value="${tag.id}"/></td> <td width="40%"><html-el:link href="/action/tag_config.do?id=${tag.id}"><c:out value="${tag.name}"/></html-el:link></td> <td width="55%"> <c:choose> <c:when test="${not empty tag.description}"><c:out value="${tag.description}"/></c:when> <c:otherwise> </c:otherwise> </c:choose> </td> <td> <jlmenu:body id="tag_actions_id${tag.id}"/> </td> </tr> </c:forEach> </table> <html-el:button property="btn" value="Delete selected" /> <html-el:reset property="reset" value="Reset" /> </html-el:form> </c:if> </td> </tr> <tr> <td colspan="2" align="center"> <%--paging start--%> <c:if test="${tags.paging.numRecords > tags.paging.increment}"> <c:set value="${tags.paging}" var="paging"/> <script>pagingForm=document.forms[0];</script> <%@include file="../paging.jsp"%> </c:if> <%--paging end--%> </td> </tr> </table> --- NEW FILE: tag_config_int.jsp --- <%-- The contents of this file are subject to the Qlusters Public License Version 1.1 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.openqrm.org/content/view/33/69/. Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is openQRM. The Initial Developer of the Original Code is Qlusters Corporation. Portions created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights Reserved. Contributor(s): Description: Comments: --%> <%@include file="../../include/content.inc"%> <c:set value="${tagConfig}" var="tag"/> <c:set value="${tagConfig.id == null || tagConfig.id == 0}" var="isNew"/> <%@include file="/menus/definitions/tags/tag_actions.jsp" %> <!--html-el:form method="post" action="/action/tag_config.do" --> <html-el:form method="post" action="/action/tag_config.do"> <input type="hidden" name="id" id="id" value="<c:out value="${tagConfig.id}"/>"/> <input type="hidden" name="action" id="action" value=""/> <input type="hidden" name="new" id="new" value="<c:out value="${tagConfig.new}"/>"/> <input type="hidden" name="oldName" id="oldName" value="<c:out value="${tagConfig.oldName}"/>"/> <!--script>alert(document.forms[0].id.value);</script--> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="h1Row"> <td width="100%"><h1>Tags</h1></td> <td> <c:if test="${!isNew}" > <jlmenu:body id="tag_actions_id${tagConfig.id}"/> </c:if> </td> </tr> <tr> <td colspan="2" height="50"> <c:choose> <c:when test="${tagConfig.id != null}"><h2><c:out value="${tagConfig.oldName}"/></h2></c:when> <c:otherwise><h2>New Tag</h2></c:otherwise> </c:choose> </td> </tr> <tr> <td colspan="2"> <p> <h3>Tag Name:</h3><br/> <html-el:text property="tag.name" styleClass="long" maxlength="50"/> </p> <p> <h3>Description:</h3><br> <html-el:textarea property="tag.description" styleClass="long"/> </p> <html-el:button property="actionS" value="Save" /> <html-el:button property="actionD" value="Delete" /> <html-el:button property="actionC" value="Cancel" /> <html-el:reset property="reset" value="Reset" /> </td> </tr> </table> </html-el:form> --- NEW FILE: tags.jsp --- <%-- The contents of this file are subject to the Qlusters Public License Version 1.1 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.openqrm.org/content/view/33/69/. Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is openQRM. The Initial Developer of the Original Code is Qlusters Corporation. Portions created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights Reserved. Contributor(s): Description: Comments: --%> <%@ taglib uri='/WEB-INF/tld/struts-tiles-1.2.tld' prefix='tiles' %> <tiles:insert page='/templates/qrm_template.jsp'> <tiles:put name="title" value="openQRM » Tags" /> <tiles:put name="onPageLoad" value="initLinksAndButtonsConfirmations();" /> <tiles:put name="calendar" value="" /> <tiles:put name='header' value='/action/header.do' /> <tiles:put name='sidebar' value='/action/sidebar.do' /> <tiles:put name='content' value='/views/tags/tags_int.jsp'/> <tiles:put name='footer' value='/include/footer.jsp'/> </tiles:insert> --- NEW FILE: tag_config.jsp --- <%-- The contents of this file are subject to the Qlusters Public License Version 1.1 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.openqrm.org/content/view/33/69/. Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is openQRM. The Initial Developer of the Original Code is Qlusters Corporation. Portions created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights Reserved. Contributor(s): Description: Comments: --%> <%@ taglib uri='/WEB-INF/tld/struts-tiles-1.2.tld' prefix='tiles' %> <tiles:insert page='/templates/qrm_template.jsp'> <tiles:put name="onPageLoad" value="initTracker();autoFocus('tag.name');" /> <tiles:put name="calendar" value="" /> <tiles:put name="title" value="openQRM » Tag Configuration" /> <tiles:put name='header' value='/action/header.do' /> <tiles:put name='sidebar' value='/action/sidebar.do' /> <tiles:put name='content' value='/views/tags/tag_config_int.jsp'/> <tiles:put name='footer' value='/include/footer.jsp'/> </tiles:insert> |
|
From: Matt <mat...@us...> - 2007-03-23 04:35:21
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/webapp/views/tags In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19411/base/openqrm-3.1.4/src/base/java/main/webapp/views/tags Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/webapp/views/tags added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 16:29:22
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/virtualenvironments/permissions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7285/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/virtualenvironments/permissions Added Files: VePermissionsAction.java VePermissionsForm.java Log Message: commit of release 3.1.4 --- NEW FILE: VePermissionsForm.java --- /******************************************************************************* * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2005-2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ package com.qlusters.qrm.web.virtualenvironments.permissions; import org.apache.commons.lang.enums.EnumUtils; import com.qlusters.qrm.server.api.objects.Paging; import com.qlusters.qrm.server.api.objects.users.UsersFilter; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; import com.qlusters.qrm.utils.BaseEnum; import com.qlusters.qrm.utils.Prefs; import com.qlusters.qrm.web.common.BaseConfigForm; import com.qlusters.qrm.web.common.MultiOptionsWrapper; public class VePermissionsForm extends BaseConfigForm { public static final class AutorizationFilterEnum extends BaseEnum { private static final String AUTORIZED_NAME = Prefs.getPrefs() .getString(VePermissionsForm.class, "AUTORIZED_NAME", "Authorized"); private static final String NON_AUTORIZED_NAME = Prefs.getPrefs() .getString(VePermissionsForm.class, "NON_AUTORIZED_NAME", "Not Authorized"); public static final AutorizationFilterEnum AUTORIZED = new AutorizationFilterEnum( AUTORIZED_NAME, 1); public static final AutorizationFilterEnum NON_AUTHORIZED = new AutorizationFilterEnum( NON_AUTORIZED_NAME, 2); private AutorizationFilterEnum(String name, int value) { super(name, value); } public static AutorizationFilterEnum getEnum(String name) { return (AutorizationFilterEnum) EnumUtils.getEnum( AutorizationFilterEnum.class, name); } } private Integer[] ids; private VirtualEnvironmentData ve; private MultiOptionsWrapper users = new MultiOptionsWrapper(); private UsersFilter filter = new UsersFilter(); Integer[] filterRoleIds; private Paging paging = new Paging(true); private boolean override; private AutorizationFilterEnum authorizationFilter; private Integer[] prevActiveIds; private boolean groupAction; Integer[] conflictingIds; public VePermissionsForm() { super(); // TODO Auto-generated constructor stub } /** * @return Returns the id. */ public Integer[] getIds() { return ids; } /** * @param id The id to set. */ public void setIds(Integer[] ids) { this.ids = ids; } /** * @return Returns the users. */ public MultiOptionsWrapper getUsers() { return users; } /** * @return Returns the filter. */ public UsersFilter getFilter() { return filter; } /** * @param filter The filter to set. */ public void setFilter(UsersFilter filter) { this.filter = filter; } /** * @return Returns the VirtualEnvironmentData. */ public VirtualEnvironmentData getVe() { return ve; } /** * @param ve The VirtualEnvironmentData to set. */ public void setVe(VirtualEnvironmentData ve) { this.ve = ve; } /** * @return Returns the override. */ public boolean isOverride() { return override; } /** * @param override The override to set. */ public void setOverride(boolean override) { this.override = override; } /** * @return Returns the paging. */ public Paging getPaging() { return paging; } /** * @param paging The paging to set. */ public void setPaging(Paging paging) { this.paging = paging; } //bypass tag library parsing problem public int getOptionsSize() { return getUsers().getAllOptions().size(); } /** * @return Returns the filterRoleIds. */ public Integer[] getFilterRoleIds() { return filterRoleIds; } /** * @param filterRoleIds The filterRoleIds to set. */ public void setFilterRoleIds(Integer[] filterRoleIds) { this.filterRoleIds = filterRoleIds; } public AutorizationFilterEnum getAuthorizationFilterEnum() { return authorizationFilter; } /** * @param associateAction The associateAction to set. */ public void setAuthorizationFilter(Integer filter) { if (filter != null) { authorizationFilter = (AutorizationFilterEnum) EnumUtils.getEnum( AutorizationFilterEnum.class, filter.intValue()); } } public Integer getAuthorizationFilter() { if (authorizationFilter != null) return new Integer(authorizationFilter.getValue()); return null; } /** * @return Returns the prevActiveIds. */ public Integer[] getPrevActiveIds() { return prevActiveIds; } /** * @param prevActiveIds The prevActiveIds to set. */ public void setPrevActiveIds(Integer[] prevActiveIds) { this.prevActiveIds = prevActiveIds; } public boolean isGroupAction() { return groupAction; } public void setGroupAction(boolean groupAction) { this.groupAction = groupAction; } /** * @return Returns the conflictingIds. */ public Integer[] getConflictingIds() { return conflictingIds; } /** * @param conflictingIds The conflictingIds to set. */ public void setConflictingIds(Integer[] conflictingIds) { this.conflictingIds = conflictingIds; } } --- NEW FILE: VePermissionsAction.java --- /******************************************************************************* * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2005-2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ package com.qlusters.qrm.web.virtualenvironments.permissions; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import com.qlusters.qrm.server.api.exceptions.ApiException; import com.qlusters.qrm.server.api.exceptions.GroupActionExceededException; import com.qlusters.qrm.server.api.exceptions.SystemBrokenException; import com.qlusters.qrm.server.api.exceptions.users.UserNotAssociatedException; import com.qlusters.qrm.server.api.exceptions.users.UserNotFoundException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentNotFoundException; import com.qlusters.qrm.server.api.objects.ApiObject; import com.qlusters.qrm.server.api.objects.QrmEntityType; import com.qlusters.qrm.server.api.objects.users.RoleKey; import com.qlusters.qrm.server.api.objects.users.RolesEnum; import com.qlusters.qrm.server.api.objects.users.UserData; import com.qlusters.qrm.server.api.objects.users.UserKey; import com.qlusters.qrm.server.api.objects.users.UsersFilter; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentKey; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentsFilterData; import com.qlusters.qrm.utils.CollectionUtils; import com.qlusters.qrm.utils.logging.Log; import com.qlusters.qrm.utils.logging.LogFactory; import com.qlusters.qrm.web.common.ActionContext; import com.qlusters.qrm.web.common.LabelValueUtils; import com.qlusters.qrm.web.common.MultiOptionsWrapper; import com.qlusters.qrm.web.common.exceptions.IllegalRequestException; import com.qlusters.qrm.web.users.UserUtils; import com.qlusters.qrm.web.virtualenvironments.config.BaseVeConfigAction; /** * @author nilia * * @struts.action * name="vePermissions" * path="/action/ve_permissions" * input="/views/ve_permissions.jsp" * scope="request" * validate="true" * * @struts.action-forward * name="success" * path="/views/ve_permissions.jsp" * */ public class VePermissionsAction extends BaseVeConfigAction { private static final Log log = LogFactory.getLog(VePermissionsAction.class); public VePermissionsAction() { super(); // TODO Auto-generated constructor stub } public void doUpdate(ActionForm form, ActionContext context) throws SystemBrokenException, ApiException, IllegalRequestException { VePermissionsForm configForm = (VePermissionsForm) form; VirtualEnvironmentsFilterData veFilterData = getVeFilter(configForm .getIds(), context); Set veIds = veFilterData.getSelectedIds(); //if the user selected group action on "All" ves if (CollectionUtils.isEmpty(veIds)) { veIds = CollectionUtils.toSet(getVeServices() .getVirtualEnvironmentIds(veFilterData)); } Set<VirtualEnvironmentKey> veKeys = veIdsToKeys(veIds); //get all super users Set<Integer> superUsersIds = getSuperUserIds(); Integer[] activeIds = configForm.getUsers().getActiveIds(); int size = activeIds != null ? activeIds.length : 0; Set<UserKey> userKeys = new HashSet<UserKey>(size); //remove all super users from the list of selected ids for (int i = 0; i < size; i++) { //extract zeros if (activeIds[i].intValue() != 0) { if (!superUsersIds.contains(activeIds[i])) { userKeys.add(UserKey.createKey(activeIds[i])); } } } Integer[] prevActiveIds = configForm.getPrevActiveIds(); Collection<Integer> prevCol = CollectionUtils .asCollection(prevActiveIds); Collection<Integer> activeCol = CollectionUtils.asCollection(activeIds); prevCol.removeAll(activeCol); Set<UserKey> prevUserKeys = new HashSet<UserKey>(1); //remove all super users from the list of previously selected ids for (Iterator iter = prevCol.iterator(); iter.hasNext();) { Integer userId = (Integer) iter.next(); //extract zeros if (userId.intValue() != 0) { if (!superUsersIds.contains(userId)) { prevUserKeys.add(UserKey.createKey(userId)); } } } try { getUserServices().associateVeAdmin(userKeys, veKeys); getUserServices().dissociateVeAdmin(prevUserKeys, veKeys); } catch (UserNotFoundException e) { addError(context, "user", "notFound", e); throw e; } catch (VirtualEnvironmentNotFoundException e) { addError(context, "ve", "notFound", e); throw e; } catch (UserNotAssociatedException e) { addError(context, "user", "notAssociated", e); throw e; } } public ActionForward doView(ActionForm form, ActionContext context) throws SystemBrokenException, IllegalRequestException, ApiException { VePermissionsForm configForm = (VePermissionsForm) form; VirtualEnvironmentsFilterData veFilterData = getVeFilter(configForm .getIds(), context); VirtualEnvironmentData ve = null; try { ve = getVeServices().getGroupData(veFilterData); } catch (GroupActionExceededException e) { if (e.getCurrentRequestedOperation() == 0) { //we know we dont get here without any ids throw new VirtualEnvironmentNotFoundException( (Integer) veFilterData.getSelectedIds().iterator().next()); } //if group action exceeded issue an error to the user and forward it //to filter result page because it can not be configured // do not rollback transaction in this case else { addError(context, "groupAction", "viewFail", e); return context.findForward("groupFailure"); } } //check if we handling group action or not boolean group = ve.containsProperty(VirtualEnvironmentData.isGroupKey); configForm.setGroupAction(group); Set veIds = veFilterData.getSelectedIds(); //if the user selected group action on "All" ves if (group && CollectionUtils.isEmpty(veIds)) { veIds = CollectionUtils.toSet(getVeServices() .getVirtualEnvironmentIds(veFilterData)); } configForm.setVe(ve); Set<RoleKey> roleKeys = UserUtils.roleIdsToRoleKeys(configForm .getFilterRoleIds()); configForm.getFilter().setRoles(roleKeys); VePermissionsForm.AutorizationFilterEnum authorizationFilter = configForm .getAuthorizationFilterEnum(); if (VePermissionsForm.AutorizationFilterEnum.AUTORIZED .equals(authorizationFilter)) { configForm.getFilter().setVeAdmins(veIdsToKeys(veIds), false); } else if (VePermissionsForm.AutorizationFilterEnum.NON_AUTHORIZED .equals(authorizationFilter)) { configForm.getFilter().setVeAdmins(veIdsToKeys(veIds), true); } //get all users List<UserData> allUsers = getUserServices().getUsers( configForm.getFilter(), configForm.getPaging(), null); MultiOptionsWrapper.populateAllOptions(allUsers, configForm.getUsers()); //mark active Ids and conflicting ids Set activeIds = new HashSet(); boolean conflictFound = getAuthorizedUsers(allUsers, veIds, activeIds); configForm.getUsers().setActiveIds(toIntArray(activeIds)); if (conflictFound) { Map conflictProperties = (Map) ve.getProperties().get( ApiObject.ConflictPropertiesKey); conflictProperties.put("users", Boolean.TRUE); } setRolesEnumList(context.getRequest()); setAuthorizationFilterEnum(context.getRequest()); return context.findForward(FORWARD_SUCCESS); } protected void setBreadCrumb(ActionForm form, ActionContext context, String subname, String[] args) { VePermissionsForm configForm = (VePermissionsForm) form; if (!configForm.isGroupAction()) { args = new String[2]; args[0] = "" + configForm.getVe().getId(); args[1] = configForm.getVe().getName(); } else { subname = "groupAction"; } super.setBreadCrumb(form, context, subname, args); } protected boolean validate(Set userKeys, ActionContext context) { if (CollectionUtils.isEmpty(userKeys)) { addError(context, "parameter", "missing", new Object[]{}); } if (hasErrors(context)) return false; return true; } /** * For each virtual server in the group get all associated users. * Create an initial list of active ids according to the first ve. * For each virtual server, and for each user if the user does not appear * in the list of active ids, add it to the list of active ids and to the list of conflicts. * * @param allUsers * @param veIds * @return */ private boolean getAuthorizedUsers(List allUsers, Set<Integer> veIds, Set<Integer> activeIds) { Iterator veIter = veIds.iterator(); //first ve Integer firstVeId = (Integer) veIter.next(); UsersFilter authorizedFilter = new UsersFilter(); authorizedFilter.setVeAdmins(CollectionUtils .asSet(VirtualEnvironmentKey.create(firstVeId, null)), false); List<UserData> authorizedUsers = getUserServices().getUsers( authorizedFilter, null, null); boolean conflictFound = false; //verify that users are in scope according to specified filter and paging for (UserData user : authorizedUsers) { if (allUsers.contains(user)) { activeIds.add(user.getId()); } } //now go over all other virtual environments and discover conflicts while (veIter.hasNext()) { Integer veId = (Integer) veIter.next(); authorizedFilter.setVeAdmins(CollectionUtils .asSet(VirtualEnvironmentKey.create(veId, null)), false); authorizedUsers = getUserServices().getUsers(authorizedFilter, null, null); for (UserData user : authorizedUsers) { //if user is in scope if (allUsers.contains(user)) { //if user does not appear in active ids, add it and mark it as conflict if (!activeIds.contains(user.getId())) { activeIds.add(user.getId()); conflictFound = true; } } } } return conflictFound; } private void setAuthorizationFilterEnum(HttpServletRequest request) { request .setAttribute( "AuthorizationFilterEnum", LabelValueUtils .baseEnumToLabelValueList(VePermissionsForm.AutorizationFilterEnum.class)); } private static Set<VirtualEnvironmentKey> veIdsToKeys(Set<Integer> ids) { Set<VirtualEnvironmentKey> veKeys = new HashSet<VirtualEnvironmentKey>( 1); for (Integer id : ids) { veKeys.add(VirtualEnvironmentKey.create(id, null)); } return veKeys; } private static Integer[] toIntArray(Set set) { Integer[] ids = new Integer[set.size()]; set.toArray(ids); return ids; } @Override protected QrmEntityType getActionEntity(ActionContext context) { // TODO Auto-generated method stub return QrmEntityType.VIRTUAL_ENVIRONMENT; } private Set<Integer> getSuperUserIds() { UsersFilter filter = new UsersFilter(); filter.setRoles(CollectionUtils.asSet(RoleKey .createKey(RolesEnum.SUPER_USER.getName()))); List<UserData> superUsers = getUserServices().getUsers(filter, null, null); Set<Integer> superUsersIds = new HashSet<Integer>(superUsers.size()); for (UserData superUser : superUsers) { superUsersIds.add(superUser.getId()); } return superUsersIds; } } |
|
From: Matt <mat...@us...> - 2007-03-22 16:13:53
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/storageservers/control In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/storageservers/control Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/storageservers/control added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 16:11:01
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/users/cli In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/users/cli Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/web/users/cli added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 16:10:54
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/tftpboot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7285/base/openqrm-3.1.4/src/base/tftpboot Added Files: Makefile Log Message: commit of release 3.1.4 --- NEW FILE: Makefile --- ################################################################################ # # # The contents of this file are subject to the Qlusters Public License # Version 1.1 (the License); you may not use this file except in compliance # with the License. # You may obtain a copy of the License at # http://www.openqrm.org/content/view/33/69/. # # Software distributed under the License is distributed on an AS IS basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for # the specific language governing rights and limitations under the License. # # The Original Code is openQRM. # # The Initial Developer of the Original Code is Qlusters Corporation. Portions # created by Qlusters Corporation are Copyright (C) 2003-2007. All Rights # Reserved. # # Contributor(s): # # Description: # # Comments: ################################################################################ # # Qrm pxe Makefile # ifndef SOURCEDDIR export SOURCEDDIR=../.. endif ifndef OUTDIR export OUTDIR=../../../out/ endif PACKAGE_CONFIG_FILE_SYSLINUX=$(SOURCEDDIR)/base/tftpboot/build/syslinux.conf PACKAGE_CONFIG_FILE_NASM=$(SOURCEDDIR)/base/tftpboot/build/nasm.conf PATH_SYSLINUX=$(shell $(MAKE_HELPER) get_package_path $(PACKAGE_CONFIG_FILE_SYSLINUX)) PATH_NASM=$(shell $(MAKE_HELPER) get_package_path $(PACKAGE_CONFIG_FILE_NASM)) INSTALL_CMD ?= /usr/bin/install INSTALL ?= $(INSTALL_CMD) -D -m 0644 all: check @$(MAKE_HELPER) build_package $(PACKAGE_CONFIG_FILE_NASM) @$(INSTALL) -D -m 0755 $(QRM_CACHE_DIR)/$(PATH_NASM)/nasm $(QRM_ROOT_DIR)/bin/nasm @$(MAKE_HELPER) build_package $(PACKAGE_CONFIG_FILE_SYSLINUX) install: @echo "installing syslinux/pxelinux for Qrm" @mkdir -p $(OUTDIR)/qrm/tftpboot/pxelinux.cfg/ $(OUTDIR)/qrm/tftpboot/boot/ @$(INSTALL) -D -m 0644 $(QRM_CACHE_DIR)/$(PATH_SYSLINUX)/pxelinux.0 $(OUTDIR)/qrm/tftpboot/pxelinux.0 @$(INSTALL) -D -m 0777 $(QRM_CACHE_DIR)/$(PATH_SYSLINUX)/com32/modules/mboot.c32 \ $(OUTDIR)/qrm/tftpboot/pxelinux/com32/modules/mboot.c32 clean: check @echo "cleaning up syslinux/pxelinux" @/bin/rm -rf $(OUTDIR)/qrm/tftpboot realclean: clean @echo "running realclean for pxelinux" @/bin/rm -rf $(QRM_CACHE_DIR)/src/syslinux-* \ $(QRM_CACHE_DIR)/src/nasm-* \ $(QRM_CACHE_DIR)/$(PATH_SYSLINUX) \ $(QRM_CACHE_DIR)/$(PATH_NASM) \ $(QRM_ROOT_DIR)/build/syslinux \ $(QRM_ROOT_DIR)/bin \ $(QRM_ROOT_DIR)/build/nasm configure: check: @if [ -z $(QRM_CACHE_DIR) ]; then echo "ERROR: QRM_CACHE_DIR not set!"; exit 1; fi @if [ -z $(QRM_ROOT_DIR) ]; then echo "ERROR: QRM_ROOT_DIR not set!"; exit 1; fi @if [ -z $(OUTDIR) ]; then echo "ERROR: OUTDIR not set!"; exit 1; fi |
|
From: Matt <mat...@us...> - 2007-03-22 16:06:41
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/webapp/unsecure/help In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7285/base/openqrm-3.1.4/src/base/java/main/webapp/unsecure/help Added Files: index.html Log Message: commit of release 3.1.4 --- NEW FILE: index.html --- <!-- The contents of this file are subject to the Qlusters Public License Version 1.1 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.openqrm.org/content/view/33/69/. Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is openQRM. The Initial Developer of the Original Code is Qlusters Corporation. Portions created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights Reserved. Contributor(s): Description: Comments: --> <html> <head> <title>QRM Help</title> </head> <body> <h1>QRM Help</h1> <h2>This site is under construction</h2> </body> </html> |
|
From: Matt <mat...@us...> - 2007-03-22 16:06:41
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/webapp/plugins In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/webapp/plugins Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/webapp/plugins added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 16:05:13
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/virtualenvironments In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7285/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/virtualenvironments Added Files: AssignmentChecker.java VirtualEnvironmentTracker.java VirtualEnvironmentsValidator.java FailureService.java VirtualEnvironmentsFinder.java HostingVirtualEnvironmentConfigurator.java VirtualEnvironmentsConfigurator.java Log Message: commit of release 3.1.4 --- NEW FILE: AssignmentChecker.java --- /******************************************************************************* * * * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ /* * package: com.qlusters.qrm.server.scheduler.objects * type: NodeIsUpChecker * author: ittay * * Revision History: * May 11, 2003 - created * */ package com.qlusters.qrm.server.logic.virtualenvironments; import java.util.Date; import javax.management.InstanceNotFoundException; import javax.management.Notification; import javax.management.NotificationListener; import com.qlusters.qrm.server.api.exceptions.SystemBrokenException; import com.qlusters.qrm.server.api.exceptions.users.LoginException; import com.qlusters.qrm.server.api.exceptions.users.RoleNotFoundException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentNotFoundException; import com.qlusters.qrm.server.api.objects.events.EventsKeys; import com.qlusters.qrm.server.api.objects.transactions.ContainerServices; import com.qlusters.qrm.server.api.objects.transactions.QrmTransactionContext; import com.qlusters.qrm.server.api.objects.transactions.ContainerServices.TransactionNotStartedException; import com.qlusters.qrm.server.api.objects.users.RolesEnum; import com.qlusters.qrm.server.api.objects.virtualenvironments.LifecycleStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; import com.qlusters.qrm.server.api.services.users.Loginer; import com.qlusters.qrm.server.dal.exceptions.SessionNotFoundException; import com.qlusters.qrm.server.logic.Finder; import com.qlusters.qrm.server.logic.events.EventsManager; import com.qlusters.qrm.server.logic.objects.Timer; import com.qlusters.qrm.server.logic.users.AuthorizationManager; import com.qlusters.qrm.utils.Prefs; import com.qlusters.qrm.utils.logging.Log; import com.qlusters.qrm.utils.logging.LogFactory; /** * @author ittay * * this class checks whether a VE is not starting after being activated */ public class AssignmentChecker implements NotificationListener { private static final Log log = LogFactory.getLog(AssignmentChecker.class); private static final String timerName = Prefs.getPrefs().getString( AssignmentChecker.class, "timerName", "qrm:service=checker_timer"); private static final String veUpCheckType = Prefs.getPrefs().getString( AssignmentChecker.class, "veUpCheckType", "veUpCheck_"); private static final String veFailureCheckType = Prefs.getPrefs() .getString(AssignmentChecker.class, "veFailureCheckType", "veFailureCheck_"); private final Timer timer = new Timer(timerName); private static final AssignmentChecker instance = new AssignmentChecker(); /** * */ private AssignmentChecker() { timer.addNotificationListener(this, null, null); } /** * * @return */ public static AssignmentChecker getInstance() { return instance; } /** * schedule check virtual environment is up after a given time ahead * * @param veId * @param timeAhead milliseconds */ public void scheduleVirtualEnvironmentUpCheck(Integer veId, long timeAhead) { removeCheck(veId, veUpCheckType); scheduleCheck(veId, timeAhead, veUpCheckType); } /** * schedule check virtual environment is not starting after a given time ahead * * @param veId * @param timeAhead milliseconds */ public void scheduleVirtualEnvironmentFailureCheck(Integer veId, long timeAhead) { removeCheck(veId, veFailureCheckType); scheduleCheck(veId, timeAhead, veFailureCheckType); } private void scheduleCheck(Integer veId, long timeAhead, String type) { Date date = new Date(System.currentTimeMillis() + timeAhead); timer.addNotification(type + veId, "Check VE " + veId, veId, date); } private void removeCheck(Integer veId, String type) { try { timer.removeNotifications(type + veId); } catch (InstanceNotFoundException e) { // do nothing } } /** * @see javax.management.NotificationListener#handleNotification(javax.management.Notification, java.lang.Object) */ public void handleNotification(Notification notification, Object handBack) { String type = notification.getType(); Integer id = (Integer) notification.getUserData(); String session = null; session = AuthorizationManager.getInstance().createSession( RolesEnum.SUPER_USER, (Integer[]) null); try { try { Loginer.getInstance().login(session); } catch (LoginException e) { throw new SystemBrokenException(e.getMessage(), e); } QrmTransactionContext tx = null; tx = ContainerServices.beginTransaction(); try { //check ve is up VirtualEnvironmentData ve; try { ve = Finder.getVirtualEnvironmentDal().findById(id); } catch (VirtualEnvironmentNotFoundException ex) { //ve not found - removed log.warn("Handle " + type + " notification on " + "removed ve with id: " + id); return; } log.monitor(ve, "Handle timeout " + type + " notification"); if (type.startsWith(veFailureCheckType)) { //recheck failure after no check timeout for VE FailureService.getInstance().handleStartTimeout(ve.getId()); } else if (type.startsWith(veUpCheckType)) { if (ve.getLifecycleStatus() == LifecycleStatus.Starting) { //ve is not up - starting until now // not handling this in new model, since changing the ve to error by force // will require taking it out of error. // VirtualEnvironmentEvent event = // new VirtualEnvironmentEvent(VirtualEnvironmentEvent.Error, 0); EventsManager .getInstance() .addEvent( EventsKeys.VirtualEnvironment.Action.Start.Failed.key, ve, null); } } } catch (Exception e1) { ContainerServices.markForRollback(tx); log.error("Could not create services in AssignmentChecker", " mark transaction for rollback", e1); } finally { ContainerServices.endTransaction(); } } catch (TransactionNotStartedException e) { log.error("Failed to begin user transaction", " do not mark transaction for rollback", e); } finally { try { AuthorizationManager.getInstance().deleteSession(session); } catch (SessionNotFoundException e) { } } } } --- NEW FILE: FailureService.java --- /******************************************************************************* * * * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ /* * Created on Nov 23, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.qlusters.qrm.server.logic.virtualenvironments; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import com.qlusters.qrm.server.api.exceptions.SystemBrokenException; import com.qlusters.qrm.server.api.exceptions.events.EventNotFoundException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentNotFoundException; import com.qlusters.qrm.server.api.objects.Paging; import com.qlusters.qrm.server.api.objects.SortOrder; import com.qlusters.qrm.server.api.objects.Sorter; import com.qlusters.qrm.server.api.objects.events.EventAttribute; import com.qlusters.qrm.server.api.objects.events.EventData; import com.qlusters.qrm.server.api.objects.events.EventsFilter; import com.qlusters.qrm.server.api.objects.events.EventsKeys; import com.qlusters.qrm.server.api.objects.events.EventsSorter; import com.qlusters.qrm.server.api.objects.events.Level; import com.qlusters.qrm.server.api.objects.virtualenvironments.ApplicationStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.CompositeStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.HaType; import com.qlusters.qrm.server.api.objects.virtualenvironments.LifecycleStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.ProvisioningStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; import com.qlusters.qrm.server.dal.DalFactory; import com.qlusters.qrm.server.logic.Finder; import com.qlusters.qrm.server.logic.events.EventsManager; import com.qlusters.qrm.server.logic.events.QrmEventsUtils; import com.qlusters.qrm.utils.CollectionUtils; import com.qlusters.qrm.utils.Pair; import com.qlusters.qrm.utils.Prefs; import com.qlusters.qrm.utils.logging.Log; import com.qlusters.qrm.utils.logging.LogFactory; /** * @author zachih * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class FailureService { private static final Log log = LogFactory.getLog(FailureService.class); private HashMap checks = new HashMap(); private static final long startingTimeout = Prefs.getPrefs().getLong( FailureService.class, "startingTimeout", 5 * 60 * 1000); private static final Map failureRecoveryKeysMap = CollectionUtils .toMap(new Pair[]{ new Pair( EventsKeys.VirtualEnvironment.State.Failure.Begin.Resources.key, EventsKeys.VirtualEnvironment.State.Failure.End.Resources.key), new Pair( EventsKeys.VirtualEnvironment.State.Failure.Begin.Provisioning.key, EventsKeys.VirtualEnvironment.State.Failure.End.Provisioning.key), new Pair( EventsKeys.VirtualEnvironment.State.Failure.Begin.AAR.key, EventsKeys.VirtualEnvironment.State.Failure.End.AAR.key),}); /************************* SINGLETON *******************************/ private static FailureService instance = new FailureService(); /** * all methods are static therefore private constructor */ private FailureService() { super(); // TODO Auto-generated constructor stub } public static FailureService getInstance() { return instance; } /**************************** PUBLIC *********************************************/ /** * @throws VirtualEnvironmentNotFoundException */ public void check(Integer veId) throws VirtualEnvironmentNotFoundException { check(Finder.getVirtualEnvironmentDal().findById(veId)); } /** * */ public void check(VirtualEnvironmentData ve) throws SystemBrokenException { check(ve, false); } public void handleQrmStart() throws SystemBrokenException { Collection ves = getAllVes(); for (Iterator iter = ves.iterator(); iter.hasNext();) { VirtualEnvironmentData ve = (VirtualEnvironmentData) iter.next(); if (!ve.isRunning()) { setCheck(ve.getId(), Boolean.FALSE); } else { //how many time is ve running ? //if more that starting timeout - set check to true //else set to false and schedule check //VirtualEnvironmentScheduler s = VirtualEnvironmentScheduler.getInstance(); //Date d = s.getPreviousStart(ve); if (null == checks.get(ve.getId())) { //ve start run before failure of QRM setCheck(ve.getId(), Boolean.TRUE); } } } } /** * * @param veId */ public void handleBeforeStarting(VirtualEnvironmentData ve) { //if ve going to start - schedule failure check to future scheduleFailureCheck(ve.getId()); } /** * Called on VE start timeout * @throws VirtualEnvironmentNotFoundException * */ public void handleStartTimeout(Integer veId) throws VirtualEnvironmentNotFoundException { if (null == veId) { throw new IllegalArgumentException("Null parameter for " + "veId" + " in handleStartTimeout"); } setCheck(veId, Boolean.TRUE); check(Finder.getVirtualEnvironmentDal().findById(veId), true); } /*************************** PRIVATE ************************/ private void check(VirtualEnvironmentData ve, boolean checkStarting) { if (!ve.isAhf()) { log.trace(ve + " not AHF, not checked to failure"); return; } // List of keys of current failure ArrayList currentFailKeys = new ArrayList(); if (checkStarting) { switch (ve.getLifecycleStatus().getValue()) { case LifecycleStatus.STARTING_VALUE : //ve failed to start by timeout String key = EventsKeys.VirtualEnvironment.State.Failure.Begin.Starting.key; getEventsManager().addEvent( key, ve, EventAttribute.createAttributes("timeout", Long .toString(startingTimeout / 1000))); currentFailKeys.add(key); break; case LifecycleStatus.STOPPING_VALUE : case LifecycleStatus.INACTIVE_VALUE : log.debug(ve, " already stopping/stopped, " + "starting failure check ignored"); return; default : } } if (!hasCheck(ve.getId())) { log.trace(ve + "doesn't have check. Failure not checked."); return; } //check failure for *HA ve Collection failureKeys = getFailureKeys(ve); boolean alreadyFailed = isLastFailed(ve); //close previous alerts with another failure reason if (failureKeys != null && alreadyFailed) { for (Iterator iter = failureRecoveryKeysMap.keySet().iterator(); iter .hasNext();) { String failureKeyToResolve = (String) iter.next(); if (!failureKeys.contains(failureKeyToResolve)) { //resolve currently not failed keys //if previos failure alert exists EventData last = getLatestEvent(ve, failureKeyToResolve, null, null); if (last != null && Level.ALERT.equals(last.getLevel())) { String recoveryKey = (String) failureRecoveryKeysMap .get(failureKeyToResolve); resolve(ve, recoveryKey, failureKeyToResolve); } } } } if (failureKeys != null && !alreadyFailed) { //ve failed - create alerts for all reason of fail for (Iterator iter = failureKeys.iterator(); iter.hasNext();) { String key = (String) iter.next(); getEventsManager().addEvent(key, ve, null); } } boolean recoveredNow = (failureKeys == null && currentFailKeys.size() == 0) || isStoppingOrInactive(ve); if (recoveredNow && alreadyFailed) { //ve recovered - create event, resolve all alerts resolve(ve, EventsKeys.VirtualEnvironment.State.Failure.End.key, EventsKeys.VirtualEnvironment.State.Failure.Begin.key); } //for XHA ve check downtime /* if (ve.isXha()) { boolean lastEventIsDowntimeBegins = isLastDowntimeBegins(ve); boolean xhaFailed = xhaFailed(ve); if (xhaFailed && !lastEventIsDowntimeBegins) { //create new downtime begins event getEventsManager().addEvent( EventsKeys.VirtualEnvironment.XHA.Downtime.Begin.key, ve, null); } if ((!xhaFailed || isXhaPaused(ve) || isStoppingOrInactive(ve)) && lastEventIsDowntimeBegins) { //create new downtime ends event getEventsManager().addEvent( EventsKeys.VirtualEnvironment.XHA.Downtime.End.key, ve, null); } } */ //if VE stopping or inactive now - don't check failure and downtime more //notice that Stopping status may be if VE do restart if (isStoppingOrInactive(ve)) { setCheck(ve.getId(), Boolean.FALSE); log.debug(ve, "stopping or inactive now. " + "Failure not checked more."); } } private void scheduleFailureCheck(Integer veId) { synchronized (checks) { setCheck(veId, Boolean.FALSE); AssignmentChecker.getInstance() .scheduleVirtualEnvironmentFailureCheck(veId, startingTimeout); } } /** * Returns if failure now But if returns false - does not mean that * recovered */ private Collection getFailureKeys(VirtualEnvironmentData ve) { ArrayList keys = new ArrayList(0); HaType haType = ve.getHaType(); if (HaType.AHF.equals(haType) || HaType.AAR.equals(haType)) { if (compositeFailed(ve)) { keys .add(EventsKeys.VirtualEnvironment.State.Failure.Begin.Resources.key); } if (provisioningFailed(ve)) { keys .add(EventsKeys.VirtualEnvironment.State.Failure.Begin.Provisioning.key); } } if (HaType.AAR.equals(haType)) { if (aarFailed(ve)) { keys .add(EventsKeys.VirtualEnvironment.State.Failure.Begin.AAR.key); } } return keys.isEmpty() ? null : keys; } private boolean isLastFailed(VirtualEnvironmentData ve) { EventData last = getLatestEvent(ve, EventsKeys.VirtualEnvironment.State.Failure.key, null, null); return (last != null && EventsKeys.isSubKey(last.getKey(), EventsKeys.VirtualEnvironment.State.Failure.Begin.key)); } private EventData getLatestEvent(VirtualEnvironmentData ve, String keys, Date from, Date to) { EventsFilter query = QrmEventsUtils.createEventsFilter(keys, ve); query.setFromDate(from); query.setToDate(to); Paging paging = new Paging(); paging.setIncrement(new Integer(1)); paging.setNeedNumRecords(false); Collection eventCol = getEventsManager().findEvents(query, paging, new Sorter(EventsSorter.DATE, SortOrder.DESC)); if (eventCol == null || eventCol.isEmpty()) { return null; } return (EventData) eventCol.iterator().next(); } private Collection getAllVes() { try { Collection ves = DalFactory.getVirtualEnvironmentDal().findAll(); return ves; } catch (Exception e) { throw new SystemBrokenException( "Can't find all virtual environments", e); } } private boolean hasCheck(Integer veId) { Boolean b = (Boolean) checks.get(veId); return Boolean.TRUE.equals(b); } private void setCheck(Integer veId, Boolean check) { if (!check.equals(checks.get(veId))) { checks.put(veId, check); } } private boolean compositeFailed(VirtualEnvironmentData ve) { return CompositeStatus.isInError(ve.getCompositeStatus()); } private boolean provisioningFailed(VirtualEnvironmentData ve) { return ve.getProvisioningStatus() == ProvisioningStatus.NotEnoughResources; } private boolean aarFailed(VirtualEnvironmentData ve) { return ve.getApplicationStatus() == ApplicationStatus.Error; } private boolean isStoppingOrInactive(VirtualEnvironmentData ve) { return ve.getLifecycleStatus() == LifecycleStatus.Stopping || ve.getLifecycleStatus() == LifecycleStatus.Inactive; } private void resolve(VirtualEnvironmentData ve, String createEventKey, String resolvedEventKey) { Integer event = getEventsManager().addEvent(createEventKey, ve, null); try { getEventsManager().resolveAlerts(event, resolvedEventKey, ve); } catch (EventNotFoundException e) { //??how can it happen log.error(" can not fond newly created event " + event, e); } } private EventsManager getEventsManager() { return EventsManager.getInstance(); } } --- NEW FILE: VirtualEnvironmentsValidator.java --- /******************************************************************************* * * * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ /* * Created on Nov 21, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.qlusters.qrm.server.logic.virtualenvironments; import java.util.HashSet; import java.util.Set; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentInvalidFilesystemImageException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentInvalidKernelImageException; import com.qlusters.qrm.server.api.objects.applications.FilesystemImageDefinitionData; import com.qlusters.qrm.server.api.objects.kernel.KernelImageData; import com.qlusters.qrm.server.api.objects.kernel.SpecialSupportType; import com.qlusters.qrm.server.api.objects.storage.InterfaceType; import com.qlusters.qrm.server.api.objects.utils.CpuArchitectureUtils; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; import com.qlusters.qrm.utils.logging.Log; import com.qlusters.qrm.utils.logging.LogFactory; /** * @author nilia * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class VirtualEnvironmentsValidator { private static Log log = LogFactory .getLog(VirtualEnvironmentsValidator.class); private VirtualEnvironmentsValidator() {} /** * check correctness of filesystem images and ve in terms of sharing * @param kernel TODO * @param ve * @param isShared * @param isMulti * @param currentVe * @throws VirtualEnvironmentInvalidFilesystemImageException */ public static void validateFilesystemImages( FilesystemImageDefinitionData[] fsImages, KernelImageData kernel, VirtualEnvironmentData ve, boolean isShared, boolean isMulti) throws VirtualEnvironmentInvalidFilesystemImageException { //verify the following: //1.filesystem image matches ve in terms of shared //2.no non-shared application appears twice //3.the application is non-shared but should be 'same for all' //4. if filesystem image stored on iscsi srever kernel should support iscsi if (!isMulti) { if (fsImages.length > 1) { throw VirtualEnvironmentInvalidFilesystemImageException .sharedMismatch(ve); } } if (isShared) { if (fsImages.length != 1 || !fsImages[0].getIsShared()) { throw VirtualEnvironmentInvalidFilesystemImageException .sharedMismatch(ve); } } else { Set fsImageNames = new HashSet(); for (int i = 0; i < fsImages.length; i++) { FilesystemImageDefinitionData fsImage = fsImages[i]; //non-shared app image appears twice if (!fsImage.getIsShared() && fsImageNames.contains(fsImage.getName())) { throw VirtualEnvironmentInvalidFilesystemImageException .nonShared(ve, fsImage.getName()); } fsImageNames.add(fsImage.getName()); } } boolean needIscsiCheck = false; String storageName = null; for (int i = 0; i < fsImages.length; i++) { FilesystemImageDefinitionData fsImage = fsImages[i]; if (fsImage.getStorageServer().getStorageType().getInterface() .equals(InterfaceType.ISCSI)) { needIscsiCheck = true; storageName = fsImage.getStorageServer().getName(); } } if (needIscsiCheck && kernel != null) { boolean isAProblem = true; SpecialSupportType[] support = kernel.getSpecialSupport(); for (int i = 0; i < support.length && isAProblem; i++) { if (support[i].equals(SpecialSupportType.ISCSI)) { isAProblem = false; } } if (isAProblem) { throw VirtualEnvironmentInvalidFilesystemImageException .iscsiMismatch(ve, storageName); } } } public static void validateCpuArchitecture(Set changedProperties, VirtualEnvironmentData currentVe, VirtualEnvironmentData changedVe) throws VirtualEnvironmentInvalidKernelImageException, VirtualEnvironmentInvalidFilesystemImageException { CpuArchitectureUtils.checkCpuArchitectureCorrectness(changedProperties, currentVe, changedVe); } } --- NEW FILE: VirtualEnvironmentsFinder.java --- /******************************************************************************* * * * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ /* * Created on Nov 17, 2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.qlusters.qrm.server.logic.virtualenvironments; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Set; import com.qlusters.qrm.server.api.exceptions.GroupActionExceededException; import com.qlusters.qrm.server.api.exceptions.ObjectNotFoundException; import com.qlusters.qrm.server.api.exceptions.SystemBrokenException; import com.qlusters.qrm.server.api.exceptions.users.UserNotFoundException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentNotFoundException; import com.qlusters.qrm.server.api.objects.BasePersistentFilter; import com.qlusters.qrm.server.api.objects.FilterOperator; import com.qlusters.qrm.server.api.objects.GlobalPrefs; import com.qlusters.qrm.server.api.objects.reports.ReportData; import com.qlusters.qrm.server.api.objects.users.UserKey; import com.qlusters.qrm.server.api.objects.virtualenvironments.ApplicationStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.CompositeStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.LifecycleStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.ProvisioningStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentsBreakdownType; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentsFilterData; import com.qlusters.qrm.server.dal.DalFactory; import com.qlusters.qrm.server.dal.FavoriteDal; import com.qlusters.qrm.server.dal.UserDal; import com.qlusters.qrm.server.dal.VirtualEnvironmentDal; import com.qlusters.qrm.server.logic.Finder; import com.qlusters.qrm.server.logic.objects.BaseFinder; import com.qlusters.qrm.utils.logging.Log; import com.qlusters.qrm.utils.logging.LogFactory; /** * @author nilia * */ public class VirtualEnvironmentsFinder extends BaseFinder { private static Log log = LogFactory.getLog(VirtualEnvironmentsFinder.class); private static VirtualEnvironmentsFinder veFinder = new VirtualEnvironmentsFinder(); private VirtualEnvironmentsFinder() { } public static VirtualEnvironmentsFinder getInstance() { return veFinder; } /** * This methods return a list of non persistent objects which apply * the filter, paging and sorting. Objects are initilized only by the param * properties * @param filter * @param sorter * @param properties - list of properies name to get * @param distinct - whether the results properties should be distinct * * @return list of VirtualEnvironmentData non Persistent objects initilaized * only with the param properties */ @Override protected List getGroupProperties(BasePersistentFilter filter, Collection properties, boolean distinct) { return Finder.getVirtualEnvironmentDal().getVirtualEnvironments( (VirtualEnvironmentsFilterData) filter, null, null); } public Map getBreakdown(VirtualEnvironmentsBreakdownType type, VirtualEnvironmentsFilterData filter) throws ObjectNotFoundException { switch (type.getValue()) { case VirtualEnvironmentsBreakdownType.STATES_TOTALS_VALUE : return getVEDal().getStatesTotalBreakdown(); case VirtualEnvironmentsBreakdownType.OVERVIEW_VALUE : return getVEDal().getOverviewBreakdown(); case VirtualEnvironmentsBreakdownType.HA_VALUE : boolean if (null != filter) { } return getVEDal().getHighAviabilityBreakdown(onlyRunning); } throw new SystemBrokenException("Illegal breakdown type: " + type.getValue()); } /** * * @param lifecycle * @param composite * @param application * @param provisioning * @param anyStatus * @return List of virtual environments data which answers the param statuses */ public List getVirtualEnvironmentsByState(LifecycleStatus lifecycle, CompositeStatus composite, ApplicationStatus application, ProvisioningStatus provisioning, boolean anyStatus) { VirtualEnvironmentsFilterData filter = new VirtualEnvironmentsFilterData(); if (composite != null) { filter.setCompositeStatusFilter(composite); } if (lifecycle != null) { filter.setLifecycleStatusFilter(lifecycle); } if (provisioning != null) { filter.setProvisioningStatusFilter(provisioning); } if (application != null) { filter.setApplicationStatusFilter(application); } if (anyStatus) { filter.setFilterOperator(FilterOperator.OR); } return Finder.getVirtualEnvironmentDal().getVirtualEnvironments(filter, null, null); } public List getVirtualEnvironmentByPolicyId(Integer policyId) { return getVEDal().findByPolicyId(policyId); } public ReportData getPerformanceReport(Date fromDate, Date toDate, Integer veId) throws VirtualEnvironmentNotFoundException { return getVEDal().getPerformanceReport(fromDate, toDate, veId); } public Map countResources(Set veIds) { return getVEDal().countResources(veIds); } /** * return a list of favorite VEs of a certain user. * @param userId * @return Pair of (id ,name) */ public List getWatchList(String userName) { try { Integer userId = getUserDal().getUser(UserKey.createKey(userName)) .getId(); return getFavoriteDal().getWatchList(userId); } catch (UserNotFoundException e) { //if we can not find it return an empty list return new ArrayList(0); } } /** * This method will: * 1. apply the filter and get a list of ves * 2. create ONE virtual environment data merged from all collection * 3. mark conflict fields * * @see GlobalPrefs.GROUP_ACTION_LIMIT * @param filter * @param groupFields - collection of property names to group by. * i.e. for provisioning page we only need to group by max & init & min nodes etc` * @return VirtualEnvironmentData with non conflict attributes initialized. */ public VirtualEnvironmentData getGroupData( VirtualEnvironmentsFilterData filter) throws GroupActionExceededException { VirtualEnvironmentData groupVeData = (VirtualEnvironmentData) super .getGroupData(filter, null); return groupVeData; } /** * translates vs key to ids * @param keys * @return */ public Set<Integer> getVirtualEnvironmentIds(Set keys) { return getVEDal().getVirtualEnvironmentIds(keys); } public VirtualEnvironmentData findVirtualEnvironment(Integer id) throws VirtualEnvironmentNotFoundException { return getVEDal().findById(id); } /**************************** PRIVATE **************************/ private VirtualEnvironmentDal getVEDal() { return DalFactory.getVirtualEnvironmentDal(); } private FavoriteDal getFavoriteDal() { return DalFactory.getFavoriteDal(); } private UserDal getUserDal() { return DalFactory.getUserDal(); } } --- NEW FILE: HostingVirtualEnvironmentConfigurator.java --- /******************************************************************************* * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ package com.qlusters.qrm.server.logic.virtualenvironments; import com.qlusters.qrm.server.api.exceptions.OperationNotPermittedException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentBadConfigurationException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentDuplicateNameException; import com.qlusters.qrm.server.api.exceptions.virtualenvironments.VirtualEnvironmentNotFoundException; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; public class HostingVirtualEnvironmentConfigurator extends VirtualEnvironmentsConfigurator { private static HostingVirtualEnvironmentConfigurator instance = new HostingVirtualEnvironmentConfigurator(); protected HostingVirtualEnvironmentConfigurator() { super(); } public static HostingVirtualEnvironmentConfigurator getInstance() { return instance; } @Override public void update(VirtualEnvironmentData currentVe, VirtualEnvironmentData ve, boolean invokeServices) throws OperationNotPermittedException, VirtualEnvironmentBadConfigurationException, VirtualEnvironmentNotFoundException, VirtualEnvironmentDuplicateNameException { super.update(currentVe, ve, invokeServices); } } --- NEW FILE: VirtualEnvironmentTracker.java --- /******************************************************************************* * * * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights * Reserved. * * Contributor(s): * * Description: * * Comments: ******************************************************************************/ /* * Created on Feb 24, 2004 * */ package com.qlusters.qrm.server.logic.virtualenvironments; import java.util.Date; import java.util.Iterator; import java.util.List; import javax.management.InstanceNotFoundException; import javax.management.Notification; import javax.management.NotificationListener; import org.apache.log4j.NDC; import com.qlusters.qrm.server.api.objects.transactions.LazyTransactionInitializer; import com.qlusters.qrm.server.api.objects.transactions.TransactionalExecutor; import com.qlusters.qrm.server.api.objects.transactions.QrmTransactionContext.LockMode; import com.qlusters.qrm.server.api.objects.virtualenvironments.ApplicationStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.ProvisioningStatus; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentData; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentKey; import com.qlusters.qrm.server.api.objects.virtualenvironments.VirtualEnvironmentsFilterData; import com.qlusters.qrm.server.logic.Finder; import com.qlusters.qrm.server.logic.ha.HighAvailabilityService; import com.qlusters.qrm.server.logic.objects.Timer; import com.qlusters.qrm.utils.Prefs; import com.qlusters.qrm.utils.logging.Log; import com.qlusters.qrm.utils.logging.LogFactory; /** * @author ittay * * VirtualEnvironmentTracker.java * com.qlusters.qrm.server.ha.objects * Feb 24, 2004 */ public class VirtualEnvironmentTracker implements NotificationListener { private static final Log log = LogFactory .getLog(VirtualEnvironmentTracker.class); private static final String timerName = Prefs.getPrefs().getString( VirtualEnvironmentTracker.class, "timerName", "qrm:service=ve_tracker_timer"); private static final String aarNotificationPrefix = Prefs.getPrefs() .getString(VirtualEnvironmentTracker.class, "aarNotificationPrefix", "aarNotification_"); private static final String nerNotificationPrefix = Prefs.getPrefs() .getString(VirtualEnvironmentTracker.class, "nerNotificationPrefix", "nerNotificationPrefix"); private static final int nerTimerPeriod = Prefs.getPrefs().getInt( VirtualEnvironmentTracker.class, "nerTimerPeriod", 300); //miliseconds private static VirtualEnvironmentTracker instance = new VirtualEnvironmentTracker(); private final Timer timer = new Timer(timerName); public static VirtualEnvironmentTracker getInstance() { return instance; } VirtualEnvironmentTracker() { timer.addNotificationListener(this, null, null); } /** * @see javax.management.NotificationListener#handleNotification(javax.management.Notification, java.lang.Object) */ public void handleNotification(Notification notification, Object handBack) { if (notification.getType().equals(nerNotificationPrefix)) { handleNerTimeoutTask(); } else { //handle aha timeout handleAarTimeoutTask(notification); } } /** * @param notification */ private void handleAarTimeoutTask(Notification notification) { Integer id = (Integer) notification.getUserData(); //mark as read only, although we find VS here LazyTransactionInitializer lti = LazyTransactionInitializer .createLockModeRequiredInitializer(LockMode.READ_ONLY); try { lti.start(); NDC.push("AAR heartbeat Timeout"); log.ha(null, " Handle AAR heartbeat timeout to virtual environment " + id); HighAvailabilityService.getInstance().handleAarHeartbeatTimeout( VirtualEnvironmentKey.create(id, null)); } finally { NDC.remove(); lti.end(); } } private void handleNerTimeoutTask() { //mark as read only, although we find VS here LazyTransactionInitializer lti = LazyTransactionInitializer .createLockModeRequiredInitializer(LockMode.READ_ONLY); try { lti.start(); NDC.push("NER Timeout"); executeNerTask(); } finally { NDC.remove(); lti.end(); } } /** * @param ve */ public void addAarHeartbeatTimeout(VirtualEnvironmentData ve) { if (ve.isAarEnabled()) { if (ve.getAarTimeout().intValue() > 0) { Date date = new Date(System.currentTimeMillis() + ve.getAarTimeout().intValue() * 1000); timer.addNotification(aarNotificationPrefix + ve.getId(), "Check ve " + ve.getId() + " is up", ve.getId(), date); } } } /** * should be only used from Loader * @param vs */ public void executeNerTask() { //restart timer setNerTimer(); // for the first time we don't want to wait for delta interval and run task immediately // handle ner timer task for all virtual environments VirtualEnvironmentsFilterData filter = new VirtualEnvironmentsFilterData(); filter .setProvisioningStatusFilter(ProvisioningStatus.NotEnoughResources); List<Integer> ids = Finder.getVirtualEnvironmentDal() .getVirtualEnvironmentIds(filter); for (Iterator iter = ids.iterator(); iter.hasNext();) { Integer id = (Integer) iter.next(); TransactionalExecutor.getInstance().handleNer(id); } } private void setNerTimer() { Date date = new Date(System.currentTimeMillis() + nerTimerPeriod * 1000); try { timer.removeNotifications(nerNotificationPrefix); } catch (InstanceNotFoundException e) {} timer.addNotification(nerNotificationPrefix, "Check NER for virtual environments ", null, date); } /** * @param ve */ public void removeAarHeartbeatTimeout(VirtualEnvironmentData ve) { try { timer.removeNotifications(aarNotificationPrefix + ve.getId()); } catch (InstanceNotFoundException e) { // log.error("Could not remove timeout wait", e); } } /** * @param ve */ public void checkAar(VirtualEnvironmentData ve) { if (ve.getAarTimeout() == null || ve.getAarTimeout().intValue() == 0 || ve.getApplicationStatus() == ApplicationStatus.Error || !ve.isRunning()) { VirtualEnvironmentTracker.getInstance().removeAarHeartbeatTimeout( ve); } else if (ve.isRunning()) { VirtualEnvironmentTracker.getInstance() .rescheduleAarHeartbeatTimeout(ve); } } /** * @param ve */ private void rescheduleAarHeartbeatTimeout(VirtualEnvironmentData ve) { removeAarHeartbeatTimeout(ve); addAarHeartbeatTimeout(ve); } } --- NEW FILE: VirtualEnvironmentsConfigurator.java --- /******************************************************************************* * * * The contents of this file are subject to the Qlusters Public License * Version 1.1 (the License); you may not use this file except in compliance * with the License. * You may obtain a copy of the License at * http://www.openqrm.org/content/view/33/69/. * * Software distributed under the License is distributed on an AS IS basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is openQRM. * * The Initial Developer of the Original Code is Qlusters Corporation. Portions * created by Qlusters Corporation are Copyright (C) 2003-2006. All Rights * Reserved. * [...988 lines suppressed...] postCreateVirtualEnvironment(ve); return ve; } private static void deleteMetricValues(Collection ves) { // delete metric values Integer[] veIds = new Integer[ves.size()]; int i = 0; for (Iterator iter = ves.iterator(); iter.hasNext();) { VirtualEnvironmentData ve = (VirtualEnvironmentData) iter.next(); veIds[i] = ve.getId(); i++; } MetricManager.getInstance().deleteVeMetricValues(veIds); } } |
|
From: Matt <mat...@us...> - 2007-03-22 16:01:44
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/migration In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/migration Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/migration added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 16:01:43
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/vm In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/vm Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/vm added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 16:01:19
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/tomcat/conf In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/tomcat/conf Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/tomcat/conf added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 15:52:09
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/jlmenu/main In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/jlmenu/main Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/jlmenu/main added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 15:50:33
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/api/services/events In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/api/services/events Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/api/services/events added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 15:49:33
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/properties In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/properties Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/properties added to the repository |
|
From: Matt <mat...@us...> - 2007-03-22 15:49:32
|
Update of /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/scheduler In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3486/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/scheduler Log Message: Directory /cvsroot/openqrm/base/openqrm-3.1.4/src/base/java/main/code/com/qlusters/qrm/server/logic/scheduler added to the repository |