Rundeck 1.2 resource model provider problem

152 views
Skip to first unread message

Anthony Shortland

unread,
Apr 21, 2011, 4:58:13 PM4/21/11
to rundeck...@googlegroups.com
I've switched my project's properties to use a web based resource model provider (added "project.resources.url = http://rundeck/resources.xml"): 

[rundeck@rundeck etc]$ cat project.properties
# project.properties
#
# $Id: project.properties.template 2126 2010-08-17 21:06:08Z ahonor $
#

#
# The base directory for this project's instances
#
project.dir = /var/rundeck/projects/Development
#
# The base directory of project specific configuration files
#
project.etc.dir = /var/rundeck/projects/Development/etc

#
# The resources registration file
#
project.resources.file = /var/rundeck/projects/Development/etc/resources.xml
project.resources.url = http://rundeck/resources.xml

#
# The project description
#
project.description = 
#
# The organization 
#
project.organization = 

... and although I can pull the node list quite happily from the command-line:

[rundeck@rundeck etc]$ curl http://rundeck/resources.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project PUBLIC "-//DTO Labs Inc.//DTD Resources Document 1.0//EN" "project.dtd">

<project>
  <node name="rundeck" type="Node" description="Rundeck server node" tags="" hostname="rundeck" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="rundeck" editUrl="" remoteUrl=""/>
  <node name="node1" type="Node" description="Rundeck server node" tags="" hostname="node1" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="user1" editUrl="" remoteUrl=""/>
  <node name="node2" type="Node" description="Rundeck server node" tags="" hostname="node2" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="user2" editUrl="" remoteUrl=""/>
  <node name="node3" type="Node" description="Rundeck server node" tags="" hostname="node3" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="user3" editUrl="" remoteUrl=""/>
  <node name="node4" type="Node" description="Rundeck server node" tags="" hostname="node4" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="user4" editUrl="" remoteUrl=""/>
  <node name="node5" type="Node" description="Rundeck server node" tags="" hostname="node5" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="user5" editUrl="" remoteUrl=""/>
  <node name="node6" type="Node" description="Rundeck server node" tags="" hostname="node6" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="user6" editUrl="" remoteUrl=""/>
  <node name="node7" type="Node" description="Rundeck server node" tags="" hostname="node7" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="user7" editUrl="" remoteUrl=""/>
</project>

... I find that Rundeck is not using the node list URL

 Even if I remove the resources.xml file in the project, Rundeck just re-generates a default:

[rundeck@rundeck etc]$ rm resources.xml 
[rundeck@rundeck etc]$ cat resources.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project PUBLIC "-//DTO Labs Inc.//DTD Resources Document 1.0//EN" "project.dtd">

<project>
  <node name="rundeck" type="Node" description="Rundeck server node" tags="" hostname="rundeck" osArch="amd64" osFamily="unix" osName="Linux" osVersion="2.6.18-194.el5" username="rundeck" editUrl="" remoteUrl=""/>
</project>

... rather than pulling it from the URL as I imagine it should.

What am I doing wrong?

Anthony.



Greg Schueler

unread,
Apr 21, 2011, 5:59:22 PM4/21/11
to rundeck...@googlegroups.com
you have to update the resources via the GUI for the project.  In the Run page there is a button to update it.

If the file is empty and you try to run a dispatch command from CLI it will create a placeholder resources.xml with just the server node definition.

But I think you are right to expect that it gets it from the URL...that looks like an oversight.  Smells like an issue to file!

Greg Schueler

unread,
Apr 21, 2011, 6:08:23 PM4/21/11
to rundeck...@googlegroups.com
Also, need to amend that to say: if you view the resources in the GUI and the resources.xml file is empty, it will also create the placeholder definition. 

so it sounds like the issue should be: placeholder resources.xml should be retrieved from resources.url instead of generated

Anthony Shortland

unread,
Apr 21, 2011, 6:24:43 PM4/21/11
to rundeck...@googlegroups.com
Doh! In a side chat (and the thread below) it was pointed out to me that you need to press the "Update Nodes for project Development" button on the run page for Rundeck to get the "project.resources.url" and save it to the "project.resources.file"!

Fans of automation will see the limitations of this ... either Rundeck should automatically update its resources from the URL or there should be a method for the system of record (the resource model provider) to  trigger Rundeck to do so.


Anthony.
Reply all
Reply to author
Forward
0 new messages