Bug 759166
Summary: | rhq:system-service task in ant bundles not working | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Lukas Krejci <lkrejci> |
Component: | Provisioning | Assignee: | Nobody <nobody> |
Status: | NEW --- | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.3 | CC: | hrupp, jshaughn, jsightle |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 760116 |
Description
Lukas Krejci
2011-12-01 15:04:05 UTC
<mazz> lkrejci: what's the operating system ? <mazz> because, that bundle ant task only works on RHEL <-- venkat (~vupparap.redhat.com) has quit (Quit: Leaving) <lkrejci> mazz: F14 <mazz> /** <mazz> * An Ant task that installs a system startup/shutdown service. Currently only Red Hat Linux versions are supported. <mazz> */ <mazz> public class SystemServiceType extends AbstractBundleType { <-- skondkar (~skondkar.redhat.com) has quit (Quit: Leaving) <lkrejci> mazz: ok, that makes sense then... maybe we should improve the error reporting.. <-- spagop (~spagop.redhat.com) has left #jboss-on <mazz> I'm curious <-- imckinle (~imckinle.redhat.com) has quit (Ping timeout: 615 seconds) <mazz> because that SHOULD have spit out an error saying "This is not a Red Hat Linux" <mazz> it looks for redhat specific files <mazz> if (!OS_NAME.equals("Linux") || !REDHAT_RELEASE_FILE.exists()) { <mazz> throw new BuildException("The system-service element is only supported on Red Hat Linux systems."); <mazz> } <mazz> private static final File REDHAT_RELEASE_FILE = new File("/etc/redhat-release"); <lkrejci> mazz: that's present on fedora, too <mazz> really <mazz> ok, that answers that <-> shaun_mtg is now known as shaun <mazz> but I guess it doesn't follow the same init.d structure?? <mazz> this is why I didn't want this task to begin with :) too many OS variables for service install/startup <lkrejci> maybe, i'm not sure... but it shouldn't fail silently - because the error is not that the file is not present, but that we weren't able to install it... --> mshirley (~mshirley.208.176.stl.redhat.com) has joined #jboss-on <asantos> mazz - I'm probably missing a detail here, but what the hell. Doesn't chkconfig abstract all the OS stuff away from services? Currently, the rhq:system-service task supports not only installing a system service script but also installing system configuration files into /etc/sysconfig. I don't think chkconfig nor any other tool is able to do that in a distro-agnostic way, so manual intervention is still needed for that. Also, the rhq:system-service task can be provided with the run levels and start/stop priorities. For this to work with chkconfig, the task would have to edit the provided files before installing them so that chkconfig finds the configuration it needs directly in the file. So while I also think we should strive for making this task not RHEL specific, there is going to be more work there than just calling chkconfig --add script.path. On the otherhand specializing the java code for every linux flavor out there is not a way forward either. As far as I can tell, the exact same error occurs on RHEL systems as well. |