[rhq] modules/core
by Jay Shaughnessy
modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 127ba9e50f4a75d67cf021d0f688c2a064dc3824
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Nov 29 09:04:50 2011 -0500
Make forEachFile() more efficient.
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java b/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java
index c4ac737..14ed3af 100644
--- a/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java
+++ b/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java
@@ -353,8 +353,9 @@ public class FileUtil {
while (!directories.isEmpty()) {
File dir = directories.pop();
- if (dir.listFiles()!=null) {
- for (File file : dir.listFiles()) {
+ File[] files = dir.listFiles();
+ if (files != null) {
+ for (File file : files) {
if (file.isDirectory()) {
directories.push(file);
} else {
12 years, 5 months
[rhq] Branch 'release_jon3.x' - modules/enterprise
by mazz
modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 3f33130e4bbd732fb77835bcf8231039e08726ac
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Nov 22 16:59:23 2011 -0500
[BZ 620603] turn log level down from WARN to ERROR for org.hibernate.hql.ast.QueryTranslatorImpl
to suppress "firstResult/maxResults specified with collection fetch; applying in memory!"
warning messages (https://bugzilla.redhat.com/show_bug.cgi?id=620603)
diff --git a/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml b/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml
index 16b0384..936c5b9 100644
--- a/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml
+++ b/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml
@@ -315,6 +315,12 @@
<priority value="OFF"/>
</category>
+ <!-- Suppress "firstResult/maxResults specified with collection fetch; applying in memory!" WARN messages
+ (see https://bugzilla.redhat.com/show_bug.cgi?id=620603). -->
+ <category name="org.hibernate.hql.ast.QueryTranslatorImpl">
+ <priority value="ERROR"/>
+ </category>
+
<!-- log SQL statements -->
<!--
<category name="org.hibernate.SQL">
12 years, 5 months
[rhq] Branch 'release_jon3.x' - modules/plugins
by mazz
modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java | 39 +++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
New commits:
commit f3ba0a0db25108a41e3bdb31613c282983847b6c
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 18 12:43:46 2011 +0100
[BZ 688800] - More robust detection of EWS tomcat installation dirs.
diff --git a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java
index fc0e681..7709b86 100644
--- a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java
+++ b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java
@@ -24,6 +24,7 @@
package org.jboss.on.plugins.tomcat;
import java.io.File;
+import java.io.FileFilter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -352,7 +353,43 @@ public class TomcatDiscoveryComponent implements ResourceDiscoveryComponent, Man
return null;
}
- File tomcatDir = new File(ewsDir, "share/apache-tomcat-6.0.24");
+ //EWS supports tomcat 5 or 6 and starts them using the tomcat5.exe or
+ //tomcat6.exe. The catalina homes we want for them are stored inside
+ //$EWS_HOME/share/tomcat-<version>, where version differs.
+ //EWS 1.0.1 uses tomcat 6.0.24, while EWS 1.0.2 uses tomcat 6.0.32
+
+ //To support this in a forwards compatiblish way, let's assume that
+ //EWS is going to keep the practice of calling the main exes tomcat<MAJOR_VERSION>.exe
+ //and that the catalina homes are going to get stored in
+ //share/apache-tomcat-<MAJOR_VERSION>.x.y.
+
+ String tomcatExeName = exePath.getName().toLowerCase();
+
+ //extract the major version from the exe name
+ int dotPos = tomcatExeName.lastIndexOf(".exe");
+ if (dotPos < 1) { //paranoia, leaves out ".exe", too
+ return null;
+ }
+
+ String majorVersion = tomcatExeName.substring(dotPos - 1, dotPos);
+
+ //now try to find the directory with the corresponding tomcat install
+ //in the $EWS_HOME/share
+ final String catalinaHomePrefix = "apache-tomcat-" + majorVersion;
+ File[] tomcatInstallDirs = new File(ewsDir, "share").listFiles(new FileFilter() {
+ public boolean accept(File pathname) {
+ return pathname.isDirectory() && pathname.getName().startsWith(catalinaHomePrefix);
+ }
+ });
+
+ if (tomcatInstallDirs.length == 0) {
+ return null;
+ } else if (tomcatInstallDirs.length > 1) {
+ log.warn("Could not unambiguously determine the tomcat installation dir for EWS executable " + exePath.getAbsolutePath() + ". The candidates are: " + Arrays.asList(tomcatInstallDirs));
+ return null;
+ }
+
+ File tomcatDir = tomcatInstallDirs[0];
if (tomcatDir.exists()) {
log.debug("Detected EWS installation. catalina.home found at " + tomcatDir.getAbsolutePath());
12 years, 5 months
[rhq] Branch 'release_jon3.x' - modules/core modules/enterprise
by mazz
modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java | 15 ++++++++--
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java | 5 +++
2 files changed, 18 insertions(+), 2 deletions(-)
New commits:
commit e4eac1f96a14ff4197583b284078bd95a59e0eac
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Nov 24 12:56:28 2011 +0100
[BZ 755653] - Make sure role membership is not updated through
the updateResourceGroup() methods.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java
index 564cef3..156253c 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/group/ResourceGroup.java
@@ -409,6 +409,10 @@ public class ResourceGroup extends Group {
@ManyToMany
private Set<Resource> implicitResources;
+ //TODO ResourceGroup probably isn't the right owning side of this relationship
+ //this means that any update of a group can update the role membership,
+ //which is not something one normally does. Maybe the more logical owner of this
+ //relationship would be the Role.
@JoinTable(name = "RHQ_ROLE_RESOURCE_GROUP_MAP", joinColumns = { @JoinColumn(name = "RESOURCE_GROUP_ID") }, inverseJoinColumns = { @JoinColumn(name = "ROLE_ID") })
@ManyToMany
private Set<Role> roles = new HashSet<Role>();
@@ -562,15 +566,22 @@ public class ResourceGroup extends Group {
}
public Set<Role> getRoles() {
+ //even though the field has an initializer, it can end up
+ //being null after deserialization. Because there is no
+ //setter and there are some other public methods depending
+ //on this not being null, let's make it lazy init.
+ if (roles == null) {
+ roles = new HashSet<Role>();
+ }
return roles;
}
public void addRole(Role role) {
- this.roles.add(role);
+ getRoles().add(role);
}
public void removeRole(Role role) {
- this.roles.remove(role);
+ getRoles().remove(role);
}
@NotNull
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java
index b8e52c4..82a91dc 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/ResourceGroupManagerBean.java
@@ -206,6 +206,11 @@ public class ResourceGroupManagerBean implements ResourceGroupManagerLocal, Reso
+ "] does not have permission to modify Resource group with id [" + groupId + "].");
}
+ //roles are not to be updated by this call but the group entity
+ //owns the relationship. Let's make sure we don't change the assigned roles here.
+ group.getRoles().clear();
+ group.getRoles().addAll(attachedGroup.getRoles());
+
if (changeType == null) {
changeType = RecursivityChangeType.None;
if (attachedGroup.isRecursive() == true && group.isRecursive() == false) {
12 years, 5 months
[rhq] 2 commits - modules/core
by Jay Shaughnessy
modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java | 172 +++++-----
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java | 80 ++--
2 files changed, 131 insertions(+), 121 deletions(-)
New commits:
commit 4a6ec5f97390cc5b6a1956b0b904162ea7b2b319
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Nov 28 15:05:53 2011 -0500
[Bug 757201 - NPE in Server with drift report processing]
Not so much a fix as this was not reproducible, but some added
null protection and logging to try and ensure that a failure in
the "Ack" call does not cause a server-side failure. And to
capture more information if this happens again.
- note, some formatting changes were applied. the real changes are
lines 635-648.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index c70b546..c713297 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -166,8 +166,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
private void syncWithServer(Resource resource, DriftDefinition driftDefinition) throws IOException {
Headers headers = createHeaders(resource.getId(), driftDefinition);
if (!changeSetMgr.changeSetExists(resource.getId(), headers)) {
- log.info("No snapshot found for " + toString(resource.getId(), driftDefinition) +
- ". Downloading snapshot from server");
+ log.info("No snapshot found for " + toString(resource.getId(), driftDefinition)
+ + ". Downloading snapshot from server");
DriftServerService driftServer = pluginContainerConfiguration.getServerServices().getDriftServerService();
DriftSnapshot snapshot = driftServer.getCurrentSnapshot(driftDefinition.getId());
@@ -179,18 +179,18 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
// this point we just return and allow the agent to generate the
// initial snapshot file.
if (log.isDebugEnabled()) {
- log.debug("The server does not have any change sets for " + toString(resource.getId(), driftDefinition)
- + ". An initial snapshot needs to be generated.");
+ log.debug("The server does not have any change sets for "
+ + toString(resource.getId(), driftDefinition) + ". An initial snapshot needs to be generated.");
}
return;
}
headers.setVersion(snapshot.getVersion());
- log.info("Preparing to write snapshot at version " + snapshot.getVersion() + " to disk for " +
- toString(resource.getId(), driftDefinition));
- File currentSnapshotFile = changeSetMgr.findChangeSet(resource.getId(), driftDefinition.getName(),
- COVERAGE);
+ log.info("Preparing to write snapshot at version " + snapshot.getVersion() + " to disk for "
+ + toString(resource.getId(), driftDefinition));
+ File currentSnapshotFile = changeSetMgr
+ .findChangeSet(resource.getId(), driftDefinition.getName(), COVERAGE);
writeSnapshotToFile(snapshot, currentSnapshotFile, headers);
if (driftDefinition.isPinned()) {
@@ -200,15 +200,16 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
DriftSnapshot pinnedSnapshot = driftServer.getSnapshot(driftDefinition.getId(), 0, 0);
Headers pinnedHeaders = createHeaders(resource.getId(), driftDefinition);
File pinnedSnapshotFile = new File(currentSnapshotFile.getParent(), "snapshot.pinned");
- log.info("Preparing to write pinned snapshot to disk for " + toString(resource.getId(), driftDefinition));
+ log.info("Preparing to write pinned snapshot to disk for "
+ + toString(resource.getId(), driftDefinition));
writeSnapshotToFile(pinnedSnapshot, pinnedSnapshotFile, pinnedHeaders);
if (snapshot.getVersion() > 0) {
// Drift was previously reported. We will fetch a snapshot of the
// latest change set and write that to disk so that we avoid reporting
// drift that has already been reported to the server.
- DriftSnapshot deltaSnapshot = driftServer.getSnapshot(driftDefinition.getId(),
- snapshot.getVersion(), snapshot.getVersion());
+ DriftSnapshot deltaSnapshot = driftServer.getSnapshot(driftDefinition.getId(), snapshot
+ .getVersion(), snapshot.getVersion());
File deltaFile = new File(currentSnapshotFile.getParentFile(), "drift-changeset.txt");
Headers deltaHeaders = createHeaders(resource.getId(), driftDefinition);
deltaHeaders.setVersion(snapshot.getVersion());
@@ -317,14 +318,14 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
} catch (IOException e) {
zipFile.delete();
throw new DriftDetectionException("Failed to create change set zip file " + zipFile.getPath(), e);
-// } finally {
-// try {
-// if (stream != null) {
-// stream.close();
-// }
-// } catch (IOException e) {
-// log.warn("An error occurred while trying to close change set zip file output stream", e);
-// }
+ // } finally {
+ // try {
+ // if (stream != null) {
+ // stream.close();
+ // }
+ // } catch (IOException e) {
+ // log.warn("An error occurred while trying to close change set zip file output stream", e);
+ // }
}
try {
@@ -541,8 +542,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
schedulesQueue.removeAndExecute(schedule.getResourceId(), schedule.getDriftDefinition(), new Runnable() {
@Override
public void run() {
- File currentSnapshot = changeSetMgr.findChangeSet(schedule.getResourceId(),
- schedule.getDriftDefinition().getName(), COVERAGE);
+ File currentSnapshot = changeSetMgr.findChangeSet(schedule.getResourceId(), schedule
+ .getDriftDefinition().getName(), COVERAGE);
File pinnedSnapshot = new File(currentSnapshot.getParentFile(), "snapshot.pinned");
pinnedSnapshot.delete();
@@ -557,8 +558,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void updateDriftDetection(int resourceId, DriftDefinition driftDef, DriftSnapshot driftSnapshot) {
- File currentSnapshot = changeSetMgr.findChangeSet(resourceId, driftDef.getName(),
- COVERAGE);
+ File currentSnapshot = changeSetMgr.findChangeSet(resourceId, driftDef.getName(), COVERAGE);
File pinnedSnapshot = new File(currentSnapshot.getParentFile(), "snapshot.pinned");
Headers headers = createHeaders(resourceId, driftDef);
@@ -606,8 +606,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
final DriftDetectionSchedule schedule = schedulesQueue.find(resourceId, defName);
if (schedule == null) {
if (log.isDebugEnabled()) {
- log.debug("Unable to pin snapshot for " + toString(resourceId, defName) + " - no detection schedule " +
- "found.");
+ log.debug("Unable to pin snapshot for " + toString(resourceId, defName) + " - no detection schedule "
+ + "found.");
}
return;
}
@@ -619,8 +619,9 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void ackChangeSet(int resourceId, String defName) {
- log.info("Received server change set ack for [resourceId: " + resourceId + ", driftDefinition:" +
- defName + "]");
+ log
+ .info("Received server change set ack for [resourceId: " + resourceId + ", driftDefinition:" + defName
+ + "]");
File resourceDir = new File(changeSetsDir, Integer.toString(resourceId));
File changeSetDir = new File(resourceDir, defName);
@@ -631,11 +632,20 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
return;
}
- File snapshot = changeSetMgr.findChangeSet(resourceId, defName, COVERAGE);
- File previousSnapshot = new File(snapshot.getParentFile(), snapshot.getName() + ".previous");
+ try {
+ File snapshot = changeSetMgr.findChangeSet(resourceId, defName, COVERAGE);
+ if (null == snapshot) {
+ log.warn("Cannot complete acknowledgement. Could not find coverage changeset for [" + resourceId + ","
+ + defName + "].");
+ return;
+ }
- previousSnapshot.delete();
- deleteZipFiles(changeSetDir, "changeset_");
+ File previousSnapshot = new File(snapshot.getParentFile(), snapshot.getName() + ".previous");
+ previousSnapshot.delete();
+
+ } finally {
+ deleteZipFiles(changeSetDir, "changeset_");
+ }
}
@Override
@@ -758,16 +768,16 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
private void writeSnapshotToFile(DriftSnapshot snapshot, File file, Headers headers) throws IOException {
ChangeSetWriter writer = changeSetMgr.getChangeSetWriter(file, headers);
try {
- for (Drift drift : snapshot.getDriftInstances()) {
+ for (Drift<?, ?> drift : snapshot.getDriftInstances()) {
switch (drift.getCategory()) {
case FILE_ADDED:
writer.write(addedFileEntry(drift.getPath(), drift.getNewDriftFile().getHashId()));
break;
case FILE_CHANGED:
- writer.write(changedFileEntry(drift.getPath(), drift.getOldDriftFile().getHashId(),
- drift.getNewDriftFile().getHashId()));
+ writer.write(changedFileEntry(drift.getPath(), drift.getOldDriftFile().getHashId(), drift
+ .getNewDriftFile().getHashId()));
break;
- default: // FILE_REMOVED
+ default: // FILE_REMOVED
writer.write(removedFileEntry(drift.getPath(), drift.getOldDriftFile().getHashId()));
}
}
commit f6eba2a3f0d31a45918664109034182de01ec970
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Nov 28 14:58:12 2011 -0500
Convert back to unix line terminators
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java
index f4e62d5..b284dcc 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java
@@ -1,87 +1,87 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.clientapi.server.core;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-
-import org.rhq.core.domain.cloud.composite.FailoverListComposite;
-import org.rhq.core.domain.cloud.composite.FailoverListComposite.ServerEntry;
-
-/**
- * These are the results of a successful agent registration. After the agent has been registered by the server, this
- * object will contain the identification information assigned to the agent by the server. It will also contain the
- * list of servers this agent can fail over to in a high availability setup.
- *
- * @author John Mazzitelli
- */
-public class AgentRegistrationResults implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String agentToken;
- private FailoverListComposite failoverList;
-
- /**
- * The agent token that the agent must use in order to communicate with the server in the future.
- *
- * @return the agent's token assigned to it by the server
- */
- public String getAgentToken() {
- return agentToken;
- }
-
- /**
- * See {@link #getAgentToken()}.
- *
- * @param token
- */
- public void setAgentToken(String token) {
- agentToken = token;
- }
-
- /**
- * The FailoverListComposite that the agent must use in order to communicate with the server in the future.
- *
- * @return the FailoverListComposite assigned to it by the server (will not be <code>null</code> but may be empty)
- */
- public FailoverListComposite getFailoverList() {
- return failoverList != null ? failoverList : new FailoverListComposite(new ArrayList<ServerEntry>());
- }
-
- /**
- * See {@link #getFailoverList()}.
- *
- * @param failoverList
- */
- public void setFailoverList(FailoverListComposite failoverList) {
- this.failoverList = failoverList;
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "AgentRegistrationResults: [agent-token=" + this.agentToken + "]";
- }
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.clientapi.server.core;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import org.rhq.core.domain.cloud.composite.FailoverListComposite;
+import org.rhq.core.domain.cloud.composite.FailoverListComposite.ServerEntry;
+
+/**
+ * These are the results of a successful agent registration. After the agent has been registered by the server, this
+ * object will contain the identification information assigned to the agent by the server. It will also contain the
+ * list of servers this agent can fail over to in a high availability setup.
+ *
+ * @author John Mazzitelli
+ */
+public class AgentRegistrationResults implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String agentToken;
+ private FailoverListComposite failoverList;
+
+ /**
+ * The agent token that the agent must use in order to communicate with the server in the future.
+ *
+ * @return the agent's token assigned to it by the server
+ */
+ public String getAgentToken() {
+ return agentToken;
+ }
+
+ /**
+ * See {@link #getAgentToken()}.
+ *
+ * @param token
+ */
+ public void setAgentToken(String token) {
+ agentToken = token;
+ }
+
+ /**
+ * The FailoverListComposite that the agent must use in order to communicate with the server in the future.
+ *
+ * @return the FailoverListComposite assigned to it by the server (will not be <code>null</code> but may be empty)
+ */
+ public FailoverListComposite getFailoverList() {
+ return failoverList != null ? failoverList : new FailoverListComposite(new ArrayList<ServerEntry>());
+ }
+
+ /**
+ * See {@link #getFailoverList()}.
+ *
+ * @param failoverList
+ */
+ public void setFailoverList(FailoverListComposite failoverList) {
+ this.failoverList = failoverList;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "AgentRegistrationResults: [agent-token=" + this.agentToken + "]";
+ }
}
\ No newline at end of file
12 years, 5 months
[rhq] Branch 'release_jon3.x' - modules/core
by John Sanda
modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java | 22 +++++-----
1 file changed, 12 insertions(+), 10 deletions(-)
New commits:
commit 5aca5b19e583e8684afc316b31908069825cd35f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Nov 25 18:19:30 2011 +0100
BZ 757175 Prevent a NPE by missing directory listing rights.
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java b/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java
index 7cfac87..c4ac737 100644
--- a/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java
+++ b/modules/core/util/src/main/java/org/rhq/core/util/file/FileUtil.java
@@ -68,9 +68,9 @@ public class FileUtil {
/**
* Given a directory, this will recursively purge all child directories and files.
* If dir is actually a normal file, it will be deleted but only if deleteIt is true.
- *
+ *
* If deleteIt is true, the directory itself will be deleted, otherwise it will remain (albeit empty).
- *
+ *
* @param dir the directory to purge (if <code>null</code>, this method does nothing and returns normally)
* @param deleteIt if <code>true</code> delete the directory itself, otherwise leave it but purge its children
*/
@@ -297,7 +297,7 @@ public class FileUtil {
/**
* Strips the drive letter from the given Windows path. The drive letter is returned
* or <code>null</code> is returned if there was no drive letter in the path.
- *
+ *
* @param path the path string that will be altered to have its drive letter stripped.
* @return if there was a drive letter, it will be returned. If no drive letter was in path, null is returned
*/
@@ -326,7 +326,7 @@ public class FileUtil {
* Return just the filename portion (the portion right of the last path separator string)
* @param path
* @param separator
- * @return null if path is null, otherwise the trimmed filename
+ * @return null if path is null, otherwise the trimmed filename
*/
public static String getFileName(String path, String separator) {
if (null == path) {
@@ -353,11 +353,13 @@ public class FileUtil {
while (!directories.isEmpty()) {
File dir = directories.pop();
- for (File file : dir.listFiles()) {
- if (file.isDirectory()) {
- directories.push(file);
- } else {
- visitor.visit(file);
+ if (dir.listFiles()!=null) {
+ for (File file : dir.listFiles()) {
+ if (file.isDirectory()) {
+ directories.push(file);
+ } else {
+ visitor.visit(file);
+ }
}
}
}
@@ -444,7 +446,7 @@ public class FileUtil {
regex.append('.');
} else if (c == '*') {
- // ? match zero or more characters
+ // ? match zero or more characters
if (i + 1 < pattern.length()) {
char c2 = pattern.charAt(i + 1);
if (c2 == '*') {
12 years, 5 months
[rhq] Branch 'release_jon3.x' - 3 commits - modules/core modules/enterprise
by ips
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java | 5 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java | 12 +++++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java | 4 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 7 ++--
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java | 15 ++++------
5 files changed, 27 insertions(+), 16 deletions(-)
New commits:
commit ebdd048df03a86ac90aca8919ed6dd820b484088
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Nov 22 16:27:16 2011 -0500
[BZ 756106] ensure resource classloader is initialized in processSyncInfo() prior to making any resource component facet
calls (https://bugzilla.redhat.com/show_bug.cgi?id=756106)
(cherry picked from commit b33a34080654eb5305c5a2e46ad18d730b95ed85)
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
index 7d9024b..51ad1b7 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -2494,6 +2494,9 @@ public class InventoryManager extends AgentService implements ContainerService,
log.info("Got unknown resource: " + syncInfo.getId());
} else {
Resource resource = container.getResource();
+ // Ensure the Resource classloader is initialized on the Resource container.
+ initResourceContainer(resource);
+
if (log.isDebugEnabled()) {
log.debug("Local Resource: id=" + resource.getId() + ", status=" + resource.getInventoryStatus()
+ ", mtime=" + resource.getMtime());
commit ef9b8c17519e56b2c29aae4db0c3db5535fb2506
Merge: 3a8916b 20c2bae
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Nov 28 14:51:23 2011 -0500
Merge branch 'release_jon3.x' of ssh://git.fedorahosted.org/git/rhq/rhq into release_jon3.x
commit 3a8916b2862e5e7df038baa8c306c775a72fccd6
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Nov 14 18:00:31 2011 -0500
[BZ 753883] require a user to have MODIFY_RESOURCE perm on a Resource in order
to delete ResourceErrors from that Resource
(https://bugzilla.redhat.com/show_bug.cgi?id=753883); fix a few javadoc typos
(cherry picked from commit c6e550f9da09dc3d418fcf6fee2fd99803ee48b2)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java
index c881819..a2ec59a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceErrorsView.java
@@ -18,6 +18,8 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail;
+import java.util.Set;
+
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.types.Alignment;
@@ -37,6 +39,8 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
+import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.table.AbstractTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.Table;
@@ -126,9 +130,11 @@ public class ResourceErrorsView extends Table<ResourceErrorsDataSource> {
setListGridFields(errorTypeField, timeField, summaryField, iconField);
+ ResourceComposite resourceComposite = titleBar.getResource();
+ Set<Permission> resourcePermissions = resourceComposite.getResourcePermission().getPermissions();
+ final boolean canModifyResource = resourcePermissions.contains(Permission.MODIFY_RESOURCE);
addTableAction(extendLocatorId("delete"), MSG.common_button_delete(), MSG.common_msg_areYouSure(),
- new AbstractTableAction(TableActionEnablement.ANY) {
- @Override
+ new AbstractTableAction(canModifyResource ? TableActionEnablement.ANY : TableActionEnablement.NEVER) {
public void executeAction(final ListGridRecord[] selection, Object actionValue) {
if (selection == null || selection.length == 0) {
return;
@@ -140,7 +146,6 @@ public class ResourceErrorsView extends Table<ResourceErrorsDataSource> {
}
GWTServiceLookup.getResourceService().deleteResourceErrors(resourceErrorIds,
new AsyncCallback<Void>() {
- @Override
public void onSuccess(Void result) {
Message msg = new Message(MSG.dataSource_resourceErrors_deleteSuccess(String
.valueOf(selection.length)), Severity.Info);
@@ -148,7 +153,6 @@ public class ResourceErrorsView extends Table<ResourceErrorsDataSource> {
refresh();
}
- @Override
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(MSG.dataSource_resourceErrors_deleteFailure(),
caught);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java
index b3e801c..7fc5b46 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java
@@ -307,6 +307,10 @@ public class ResourceTitleBar extends LocatableVLayout {
}
}
+ public ResourceComposite getResource() {
+ return resourceComposite;
+ }
+
void displayResourceName(String resourceName) {
if (!resource.getName().equals(resourceName)) {
resource.setName(resourceName); // the name must have been changed by the user via the editable field
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index f87fa14..c2ac7db 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -2047,9 +2047,10 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
ResourceError error = entityManager.find(ResourceError.class, resourceErrorId);
if (error != null) {
- if (!authorizationManager.canViewResource(user, error.getResource().getId())) {
- throw new PermissionException("Cannot delete resource error [" + resourceErrorId + "]. User [" + user
- + "] does not have permission to operate on resource [" + error.getResource().getName() + "].");
+ if (!authorizationManager.hasResourcePermission(user, Permission.MODIFY_RESOURCE,
+ error.getResource().getId())) {
+ throw new PermissionException("Cannot delete Resource error [" + resourceErrorId + "]. User [" + user
+ + "] does not have permission to modify Resource [" + error.getResource().getName() + "].");
}
entityManager.remove(error);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
index 841428b..1d1ec69 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
@@ -103,8 +103,8 @@ public interface ResourceManagerLocal {
* method, make sure you have a specific reason for it; check to see if calling
* {@link #uninventoryResource(Subject, int)} would not be more appropriate.
*
- * @param user the user deleting the resource
- * @param resource the resource to be deleted
+ * @param user the user deleting the resource
+ * @param resourceId the ID of the resource to be deleted
*/
void uninventoryResourceAsyncWork(Subject user, int resourceId);
@@ -300,9 +300,6 @@ public interface ResourceManagerLocal {
PageList<Resource> findResourceByIds(Subject subject, int[] resourceIds, boolean attachParentResource,
PageControl pageControl);
- /**
- * @see ResourceManagerRemote#getResourceTree(int)
- */
Resource getResourceTree(int rootResourceId, boolean recursive);
/**
@@ -351,7 +348,9 @@ public interface ResourceManagerLocal {
void addResourceError(ResourceError resourceError);
/**
- * Deletes the given resource error, effectively removing it from its resource's list of errors.
+ * Deletes the given resource error, effectively removing it from its resource's list of errors. Requires the
+ * specified user to possess the {@link org.rhq.core.domain.authz.Permission#MODIFY_RESOURCE MODIFY_RESOURCE}
+ * permission for the Resource with which the error is associated.
*
* @param user the user deleting the resource error
* @param resourceErrorId identifies the resource error to delete
@@ -415,11 +414,11 @@ public interface ResourceManagerLocal {
/**
* Load the entire list of resources under an agent. Tries to do so in as few
- * queries as possible while prefectching the information necessary to create a tree
+ * queries as possible while prefetching the information necessary to create a tree
* view of the platform inventory. This includes resource type and subcategory information
* as well as current availability and structure.
*
- * This method also returns placesholder {@link org.rhq.core.domain.resource.composite.LockedResource}
+ * This method also returns placeholder "locked" ResourceFlyweight
* objects for resources that a user should not have visibility to in order to keep the tree a
* directed graph.
*
12 years, 5 months
[rhq] modules/enterprise
by John Sanda
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 99803343b9014aa9399ef2444cc214061bf0bdb9
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Nov 28 14:10:55 2011 -0500
[BZ 755073] Do not display the view link for binary files
We were displaying the view link for a drift entry where the type of
drift was a file change. The logic has been modified so that the view
link is not displayed.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index 1dcf23b..0cd08a1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -145,8 +145,7 @@ public class DriftDetailsView extends LocatableVLayout {
case FILE_CHANGED:
category.setValue(DriftDataSource.CATEGORY_ICON_CHANGE);
oldFile.setValue(driftDetails.getDrift().getOldDriftFile().getHashId());
- oldFileLink = createViewFileLink(driftDetails.getDrift().getOldDriftFile().getHashId(), driftDetails
- .getDrift().getPath(), driftDetails.getPreviousChangeSet().getVersion());
+ oldFileLink = spacer;
newFile.setValue(driftDetails.getDrift().getNewDriftFile().getHashId());
newFileLink = spacer;
break;
12 years, 5 months
[rhq] modules/core modules/enterprise
by Jay Shaughnessy
modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java | 172 +++++-----
modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java | 4
2 files changed, 88 insertions(+), 88 deletions(-)
New commits:
commit 4443f017ce764353f41e4c4ca17d334af5742234
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Nov 28 13:50:13 2011 -0500
[Bug 754197 - When agent runs on loopback address, the advisory text is incorrect. Administration > High Availability does not exist]
- Trivial - Fix the text
- Also, fix some jdoc text in AgentRegistrationResults (reformatted as well). No code changes.
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java
index f1d58f3..f4e62d5 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/server/core/AgentRegistrationResults.java
@@ -1,87 +1,87 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.rhq.core.clientapi.server.core;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-
-import org.rhq.core.domain.cloud.composite.FailoverListComposite;
-import org.rhq.core.domain.cloud.composite.FailoverListComposite.ServerEntry;
-
-/**
- * These are the results of a successful agent registration. After the agent has been registered by the server, this
- * object will contain the identification information assigned to the agent by the server. It will also contain the
- * list of servers this agent can fail over to an in high availability setup.
- *
- * @author John Mazzitelli
- */
-public class AgentRegistrationResults implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String agentToken;
- private FailoverListComposite failoverList;
-
- /**
- * The agent token that the agent must use in order to communicate with the server in the future.
- *
- * @return the agent's token assigned to it by the server
- */
- public String getAgentToken() {
- return agentToken;
- }
-
- /**
- * See {@link #getAgentToken()}.
- *
- * @param token
- */
- public void setAgentToken(String token) {
- agentToken = token;
- }
-
- /**
- * The FailoverListComposite that the agent must use in order to communicate with the server in the future.
- *
- * @return the FailoverListComposite assigned to it by the server (will not be <code>null</code> but may be empty)
- */
- public FailoverListComposite getFailoverList() {
- return failoverList != null ? failoverList : new FailoverListComposite(new ArrayList<ServerEntry>());
- }
-
- /**
- * See {@link #getFailoverList()}.
- *
- * @param failoverList
- */
- public void setFailoverList(FailoverListComposite failoverList) {
- this.failoverList = failoverList;
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "AgentRegistrationResults: [agent-token=" + this.agentToken + "]";
- }
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.rhq.core.clientapi.server.core;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import org.rhq.core.domain.cloud.composite.FailoverListComposite;
+import org.rhq.core.domain.cloud.composite.FailoverListComposite.ServerEntry;
+
+/**
+ * These are the results of a successful agent registration. After the agent has been registered by the server, this
+ * object will contain the identification information assigned to the agent by the server. It will also contain the
+ * list of servers this agent can fail over to in a high availability setup.
+ *
+ * @author John Mazzitelli
+ */
+public class AgentRegistrationResults implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String agentToken;
+ private FailoverListComposite failoverList;
+
+ /**
+ * The agent token that the agent must use in order to communicate with the server in the future.
+ *
+ * @return the agent's token assigned to it by the server
+ */
+ public String getAgentToken() {
+ return agentToken;
+ }
+
+ /**
+ * See {@link #getAgentToken()}.
+ *
+ * @param token
+ */
+ public void setAgentToken(String token) {
+ agentToken = token;
+ }
+
+ /**
+ * The FailoverListComposite that the agent must use in order to communicate with the server in the future.
+ *
+ * @return the FailoverListComposite assigned to it by the server (will not be <code>null</code> but may be empty)
+ */
+ public FailoverListComposite getFailoverList() {
+ return failoverList != null ? failoverList : new FailoverListComposite(new ArrayList<ServerEntry>());
+ }
+
+ /**
+ * See {@link #getFailoverList()}.
+ *
+ * @param failoverList
+ */
+ public void setFailoverList(FailoverListComposite failoverList) {
+ this.failoverList = failoverList;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "AgentRegistrationResults: [agent-token=" + this.agentToken + "]";
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
index b0608c2..59702fc 100644
--- a/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
+++ b/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java
@@ -212,7 +212,7 @@ public interface AgentI18NResourceKeys {
@I18NMessage("!!! A server has registered under a loopback address [{0}] - this should only be done for testing and demo purposes. "
+ "Only agents running on the same machine as that server will be able to interact with that server successfully. "
+ "Please double check that you really want your server to have a public endpoint of [{0}]. "
- + "See the Administration > High Availability > Servers menu in the server GUI to change the public endpoint of the server.")
+ + "See the Administration (Topology) > Servers menu in the server GUI to change the public endpoint of the server.")
String FAILOVER_LIST_HAS_LOCALHOST = "AgentMain.failover-list-has-localhost";
@I18NMessage("The server failover list has been loaded from [{0}] - there are [{1}] servers in the list")
@@ -249,7 +249,7 @@ public interface AgentI18NResourceKeys {
+ "Please double check all public endpoints of your servers and ensure\\n\\\n"
+ "they are all reachable by this agent. The failed server endpoints are:\\n\\\n" //
+ "{1}\\n\\\n" //
- + "See the Administration > High Availability > Servers in the server GUI\\n\\\n"
+ + "See the Administration (Topology) > Servers in the server GUI\\n\\\n"
+ "to change the public endpoint of a server.\\n\\\n"
+ "THIS AGENT WILL WAIT UNTIL ONE OF ITS SERVERS BECOMES REACHABLE!")
String FAILOVER_LIST_CHECK_FAILED = "AgentMain.failover-list-check-failed";
12 years, 5 months
[rhq] Branch 'release_jon3.x' - modules/core
by John Sanda
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 20c2bae9c4c9aa6f9127c0a9d81ebada8d4dfd23
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Nov 25 19:53:54 2011 +0100
BZ 757178 If we can't read the file return to prevent an Exception later.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index e0f7509..3f32f1f 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -222,8 +222,8 @@ public class DriftDetector implements Runnable {
if (!file.canRead()) {
if (log.isDebugEnabled()) {
log.debug("Skipping " + file.getPath() + " since it is not readable.");
- return;
}
+ return;
}
if (log.isInfoEnabled()) {
12 years, 5 months