example42 / puppet-jboss

Jboss Puppet Module
http://www.example42.com
Other
15 stars 25 forks source link

jboss 4 install failure #15

Closed jhoblitt closed 8 years ago

jhoblitt commented 10 years ago

It appears that puppi/etc. is expecting the basename of the URL to be name of the file actually downloaded while this isn't the case for the URLs to download jboss 4/5.

$ sudo puppet apply --modulepath=`pwd`/modules -e "class { 'jboss': version => '4' }"
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for centos6test3.sdm.noao.edu in environment production in 1.03 seconds
Notice: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Retrieve http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip/download in /var/tmp]/returns: executed successfully
Notice: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Extract download from /var/tmp]/returns: tar (child): /var/tmp/download: Cannot open: No such file or directory
Notice: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Extract download from /var/tmp]/returns: tar (child): Error is not recoverable: exiting now
Notice: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Extract download from /var/tmp]/returns: tar: Child returned status 2
Notice: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Extract download from /var/tmp]/returns: tar: Error is not recoverable: exiting now
Error: mkdir -p /opt && cd /opt && tar -zxf /var/tmp/download  returned 2 instead of one of [0]
Error: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Extract download from /var/tmp]/returns: change from notrun to 0 failed: mkdir -p /opt && cd /opt && tar -zxf /var/tmp/download  returned 2 instead of one of [0]
Notice: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[PostExtract download in /opt]: Dependency Exec[Extract download from /var/tmp] has failures: true
Warning: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[PostExtract download in /opt]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Chown download in /opt]: Dependency Exec[Extract download from /var/tmp] has failures: true
Warning: /Stage[main]/Jboss::Install/Puppi::Netinstall[netinstall_jboss]/Exec[Chown download in /opt]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss::Service/File[jboss.init]: Dependency Exec[Extract download from /var/tmp] has failures: true
Warning: /Stage[main]/Jboss::Service/File[jboss.init]: Skipping because of failed dependencies
Notice: /Stage[main]/Jboss::Service/Service[jboss]: Dependency Exec[Extract download from /var/tmp] has failures: true
Warning: /Stage[main]/Jboss::Service/Service[jboss]: Skipping because of failed dependencies
Notice: Finished catalog run in 177.85 seconds
jhoblitt commented 10 years ago

It looks like puppi::netinstall needs a new param to allow you to pass in the true filename to override the url parsing. https://github.com/example42/puppi/blob/master/manifests/netinstall.pp#L80

alvagante commented 10 years ago

I've slow internet connection in these days so I can't test, but it seems that urls like this: '4' => 'http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip', instead of '4' => 'http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip/download', are enough to get the zip. They are set here: https://github.com/example42/puppet-jboss/blob/master/manifests/init.pp#L426 If so , so if the name of the extracted dir is jboss-4.2.3.GA puppi::netinstall should work (otherwise it should be enough to fix puppi::netinstall's extracted_dir parameter in the jboss class.

If you can test the module with the fixed urls, otherwise I'll check it later.

jhoblitt commented 10 years ago

As expected, the URL change fixes it and I've opened #22 with this change. I still feel like it's probably worth while for puppi::netinstall to be able to handle that situation. Should I open another issue on puppi?

alvagante commented 8 years ago

Sorry for laate reply. I don't think it's necessary to make changes on puppi::netinstalll, the extracted_dir param can be used to cope with such situations.