Issue #18937 has been reported by Daniel Pittman.

----------------------------------------
Bug #18937: puppet resource returns zero exit code despite failing to deliver 
results
https://projects.puppetlabs.com/issues/18937

Author: Daniel Pittman
Status: Unreviewed
Priority: Normal
Assignee: 
Category: ralsh
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


<pre>
root@razor-sut-ubuntu-1204-64:~# puppet --version
3.0.2
</pre>

As you will see below, `puppet resource` exists zero despite failing to deliver 
my requested change.  This makes it pretty hard to drive this from anything but 
a human sitting at a desk, which kind of sucks, honestly.

<pre>
root@razor-sut-ubuntu-1204-64:~# puppet resource package puppet-razor 
ensure=17.4
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o 
DPkg::Options::=--force-confold --force-yes install puppet-razor=17.4' returned 
100: Reading package lists...
Building dependency tree...
Reading state information...
E: Version '17.4' for 'puppet-razor' was not found

Error: /Package[puppet-razor]/ensure: change from 0.7.0.174-1puppetlabs1 to 
17.4 failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o 
DPkg::Options::=--force-confold --force-yes install puppet-razor=17.4' returned 
100: Reading package lists...
Building dependency tree...
Reading state information...
E: Version '17.4' for 'puppet-razor' was not found

package { 'puppet-razor':
  ensure => '0.7.0.174-1puppetlabs1',
}
root@razor-sut-ubuntu-1204-64:~# echo $?
0
root@razor-sut-ubuntu-1204-64:~# puppet resource package puppet-razor 
ensure=absent
Notice: /Package[puppet-razor]/ensure: removed
package { 'puppet-razor':
  ensure => 'absent',
}
root@razor-sut-ubuntu-1204-64:~# puppet resource package puppet-razor 
ensure=17.4
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o 
DPkg::Options::=--force-confold --force-yes install puppet-razor=17.4' returned 
100: Reading package lists...
Building dependency tree...
Reading state information...
E: Version '17.4' for 'puppet-razor' was not found

Error: /Package[puppet-razor]/ensure: change from absent to 17.4 failed: Could 
not update: Execution of '/usr/bin/apt-get -q -y -o 
DPkg::Options::=--force-confold --force-yes install puppet-razor=17.4' returned 
100: Reading package lists...
Building dependency tree...
Reading state information...
E: Version '17.4' for 'puppet-razor' was not found

package { 'puppet-razor':
  ensure => 'absent',
}
root@razor-sut-ubuntu-1204-64:~# echo $?
0
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to