Bug 591576
Summary: | Request option to to use a directory other than the parent directory for the upgrade jar | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | dsteigne |
Component: | Agent | Assignee: | RHQ Project Maintainer <rhq-maint> |
Status: | CLOSED NOTABUG | QA Contact: | Mike Foley <mfoley> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 1.3.1 | CC: | jshaughn, mazz |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-05-29 18:03:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
dsteigne
2010-05-12 15:34:51 UTC
mazz - what would it take to fix this? (see issuetracker) it would not be trivial to fix this - it would involve alot of work. You'd first have to add a new agent preference to indicate where this other directory would be and then we'd have to get the agent to pass that somehow to the ant script. The ant script would then have to be refactored to install into this new temp directory, clean out the old agent location and copy the new temp content into the original agent location. We'd have to backup the original somewhere too (because we use that to revert back to the old agent if the upgrade fails). So the revert portion of the code/script needs to be refactored to know about this custom temp location. There would be alot here to fix this. I would say we not do this. The solution to the problem is to make an intermediate level in your file system where the agent and its backup versions can go that you can give proper file permissions. For example, as I understand the problem, the issue is the user installed the agent in a directory like this: /opt/rhq-agent And the agent is only given write permissions to that directory, and not the parent (/opt). Thus the auto-upgrade fails because we can't write to /opt which is where we'd store/backup our old files and build the new agent. The solution is to create a intermediate location: /opt/rhq and install the agent to "/opt/rhq/rhq-agent". You'd give the agent write access to /opt/rhq. This solves the problem. BTW: my recommended solution is already documented here: http://rhq-project.org/display/JOPR2/RHQ+Agent+Installation#RHQAgentInstallation-PreparingYourAgentToBeAutoUpdatable "Install The Agent In A Writable Directory During the update process, files will need to be written in the directory where the agent is currently installed. This means that the parent directory of the agent's install directory must be writable by the user that is running the agent. As an example, if the agent's $RHQ_AGENT_HOME (i.e. where the agent is installed) is the directory called "/opt/rhq-agent-parent/rhq-agent", the agent will need to write files to the "/opt/rhq-agent-parent" directory and therefore must have write permissions there." So those that are installing the agent should have already followed those instructions. Everyone reads the documentation when they install don't they ;) |