Bug 1162646
| Summary: | Starting rhqctl as a service script not correct in documentation | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Operations Network | Reporter: | Ken Hitchcock <ken.hitchcock> |
| Component: | Documentation | Assignee: | Tyler Kelly <tkelly> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | JON 3.2, JON 3.3.0 | CC: | dsteigne, fbrychta, loleary, mmahoney, mshirley, tkelly |
| Target Milestone: | post-GA | Keywords: | Documentation, Reopened, Triaged |
| Target Release: | JON 3.3.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: |
[Install_Guide] Needs to be reworked with info from KBase, in both the Installation Guide and Admin Config Guide.
|
|
| Last Closed: | 2017-07-14 01:56:17 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ken Hitchcock
2014-11-11 12:19:45 UTC
(In reply to Ken Hitchcock from comment #0) > Document URL: > https://access.redhat.com/documentation/en-US/ > Red_Hat_JBoss_Operations_Network/3.2/pdf/Installation_Guide/ > Red_Hat_JBoss_Operations_Network-3.2-Installation_Guide-en-US.pdf > > Section Number and Name: > 2.7 point 6 > > Describe the issue: > the command below fails to start the jon services. > su - jboss -c "/etc/init.d/rhqctl $*" & > > Suggestions for improvement: > The command needs to specify the shell to start > su - jboss -s /bin/bash -c "/etc/init.d/rhqctl $*" & > > This is described in > https://access.redhat.com/solutions/353603 > > Please note that this resolution says to use the /bin/sh shell, this wont > work for the jon rhqctl script as its /bin/bash > > Additional information: Thanks for reporting this Ken, and for providing the detail you did: it's fantastic! I've put this correction into the Installation Guide and it will be in the JON 3.3 version of the docs when the product releases. This doesn't actually fix this issue. I am not sure what the intention was with the original suggested fix but the problem here is not that you need to specify the shell -- although that would be the case if you used a user account that had no shell so is probably a good idea none the less -- but that the script is calling itself. The instructions do not really make any sense at all. Furthermore, the latest iteration doesn't even make mention in the installation guide of where the /etc/init.d/rhqctl comes from.
These same bad instructions are also found in the administration guide so the fix needs to be made in all places and be consistent. To be clear, the 3.2/3.3 documentation is suggesting that the user copy the rhqctl file from <JON_SERVER_HOME>/bin/ to /etc/init.d and then modify /etc/init.d/rhqctl and add the following line to the top:
su - jboss -c "/etc/init.d/rhqctl $*" &
Which will result in the script calling itself recursively. Even if you add the shell as suggested in comment 0:
su - jboss -s /bin/bash -c "/etc/init.d/rhqctl $*" &
Again, calling itself recursively.
This entire process needs to be cleaned up. Because JBoss ON is not providing the script necessary to run as a Sys V service, the only option I see is to provide a notice indicating that a custom script can be created that invokes rhqctl with the desired user and settings. For an example, see knowlegebase solution https://access.redhat.com/solutions/772163.
(In reply to Larry O'Leary from comment #4) > This doesn't actually fix this issue. I am not sure what the intention was > with the original suggested fix but the problem here is not that you need to > specify the shell -- although that would be the case if you used a user > account that had no shell so is probably a good idea none the less -- but > that the script is calling itself. The instructions do not really make any > sense at all. Furthermore, the latest iteration doesn't even make mention in > the installation guide of where the /etc/init.d/rhqctl comes from. > > These same bad instructions are also found in the administration guide so > the fix needs to be made in all places and be consistent. To be clear, the > 3.2/3.3 documentation is suggesting that the user copy the rhqctl file from > <JON_SERVER_HOME>/bin/ to /etc/init.d and then modify /etc/init.d/rhqctl and > add the following line to the top: > > su - jboss -c "/etc/init.d/rhqctl $*" & > > Which will result in the script calling itself recursively. Even if you add > the shell as suggested in comment 0: > > su - jboss -s /bin/bash -c "/etc/init.d/rhqctl $*" & > > Again, calling itself recursively. > > This entire process needs to be cleaned up. Because JBoss ON is not > providing the script necessary to run as a Sys V service, the only option I > see is to provide a notice indicating that a custom script can be created > that invokes rhqctl with the desired user and settings. For an example, see > knowlegebase solution https://access.redhat.com/solutions/772163. Thanks for this detail Larry. I'm going to look at fixing this for 3.3.1. In both guides. Taking ownership of JON docs bugs. This step appears to have been removed from the docs between version 3.2 and 3.3. Note found in the commented out step: Removed as per advice that JON should not be run as root user. Tested installing and running jon-server-3.3.0.GA dist as regular user without issue. As the process works for standard user accounts, it does not appear to be necessary to reintroduce this section in 3.3. To avoid confusion between this bz and bz1309482 I would suggest following: 1) Installation guide 3.2: Step 6. "Edit the rhqctl control script...", this step should be removed because it's incorrect and a note saying that it's not recommended to run JON under root user should be added. Plus a link to administration guide (Configuring JON Servers and Agents) to section "Running the JBoss ON Server as a Service" which is not correct either and must be fixed according to https://access.redhat.com/solutions/772163 (comment 4). 2) Installation guide 3.3: Step 6 is no longer there so just add a note as a optional step with a link to administration guide "Running the JBoss ON Server as a Service" which must be fixed according to https://access.redhat.com/solutions/772163 (comment 4) 3) Close bz1309482 as duplicate of this bz 4) Create new bz for fixes described in https://bugzilla.redhat.com/show_bug.cgi?id=1309482#c1 *** Bug 1309482 has been marked as a duplicate of this bug. *** changes per Bug 1162646: incl. incorporation of https://access.redhat.com/solutions/772163 into Admin doc and adding note install guide referring to admin doc for running JON as a service and a further note not to run JON as a root user. 1 - JON 3.2: Git Commit: https://gitlab.cee.redhat.com/tkelly/jon_pre33/commit/8b3ee44d12fc410def0eee2a283a1ebe7c5dff36 Git Merge: https://gitlab.cee.redhat.com/red-hat-jboss-operations-network-documentation/jon_pre33/merge_requests/6 Pantheon Previews: Config guide: https://access.qa.redhat.com/documentation/en-us/red_hat_jboss_operations_network/3.2/html-single/admin_and_config/#running-jon-as-a-service Install guide (not checked due to pantheon issues late in the afternoon/evening, but passed local build): https://access.qa.redhat.com/documentation/en-us/red_hat_jboss_operations_network/3.2/html-single/installation_guide/#install-rhel-jar 2 JON 3.3: Git Commit: https://gitlab.cee.redhat.com/tkelly/doc-jon-docs/commit/ee1985c7ffd12926e774d0334eb806b11c5cdbfc Git Merge: https://gitlab.cee.redhat.com/red-hat-jboss-operations-network-documentation/doc-jon-docs/merge_requests/29 Pantheon Previews: Config guide: https://access.qa.redhat.com/documentation/en-us/red_hat_jboss_operations_network/3.3/html-single/admin_and_config/#running-jon-as-a-service Install guide: https://access.qa.redhat.com/documentation/en-us/red_hat_jboss_operations_network/3.3/html-single/installation_guide/#install-rhel-jar 3: Done 4: https://bugzilla.redhat.com/show_bug.cgi?id=1465306 Install Guide now building on pantheon. |