Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error Reporting for (yum)pkg.upgrade #36422

Closed
rippiedoos opened this issue Sep 19, 2016 · 3 comments
Closed

No error Reporting for (yum)pkg.upgrade #36422

rippiedoos opened this issue Sep 19, 2016 · 3 comments

Comments

@rippiedoos
Copy link

Running the module pkg.upgrade or state pkg.uptodate, there is no error logged back to the master if the yum-command behind it errors. Hence the state or module succeeds but in fact it isn't. The minion logs this message in the logfile but nothing is passed back to the master. This is very similar to No error Reporting for pkg.install #3433, but this is with yum, not apt.

Setup

Running two systems with CentOS/RHEL/OracleLinux 7.2 with the following message in the salt-minion-logfile:

2016-09-19 22:20:56,075 [salt.fileclient  ][INFO    ][2635] Fetching file from saltenv 'base', ** done ** 'maintenance/check-updates.sls'
2016-09-19 22:20:56,081 [salt.state       ][INFO    ][2635] Running state [pkg.upgrade] at time 22:20:56.081200
2016-09-19 22:20:56,081 [salt.state       ][INFO    ][2635] Executing state module.run for pkg.upgrade
2016-09-19 22:20:56,140 [salt.loaded.int.module.cmdmod][INFO    ][2635] Executing command ['yum', '--quiet', 'clean', 'expire-cache'] in directory '/root'
2016-09-19 22:20:56,309 [salt.loaded.int.module.cmdmod][INFO    ][2635] Executing command ['yum', '--quiet', 'check-update'] in directory '/root'
2016-09-19 22:20:59,406 [salt.loaded.int.module.cmdmod][INFO    ][2635] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'
2016-09-19 22:20:59,907 [salt.loaded.int.module.cmdmod][INFO    ][2635] Executing command ['systemd-run', '--scope', 'yum', '--quiet', '-y', 'upgrade'] in directory '/root'
2016-09-19 22:21:00,950 [salt.minion      ][INFO    ][2428] User root Executing command saltutil.find_job with jid 20160919222100949159
2016-09-19 22:21:01,004 [salt.minion      ][INFO    ][2648] Starting a new job with PID 2648
2016-09-19 22:21:01,026 [salt.minion      ][INFO    ][2648] Returning information for job: 20160919222100949159
2016-09-19 22:21:02,648 [salt.loaded.int.module.cmdmod][ERROR   ][2635] Command '['systemd-run', '--scope', 'yum', '--quiet', '-y', 'upgrade']' failed with return code: 1
2016-09-19 22:21:02,648 [salt.loaded.int.module.cmdmod][ERROR   ][2635] output: Running as unit run-2645.scope.
Error: Package: kernel-uek-4.1.12-61.1.6.el7uek.x86_64 (oraclelinux7-uek4-x86_64)
           Requires: dracut-kernel >= 033-360.0.3
           Installed: dracut-033-359.0.1.el7.x86_64 (@anaconda/7.2)
               dracut-kernel = 033-359.0.1.el7
Error: Package: kernel-uek-4.1.12-61.1.6.el7uek.x86_64 (oraclelinux7-uek4-x86_64)
           Requires: linux-firmware >= 20160604-44.git57b649d9.0.2
           Installed: linux-firmware-20150904-43.git6ebf5d5.0.1.el7.noarch (@anaconda/7.2)
               linux-firmware = 20150904-43.git6ebf5d5.0.1.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
2016-09-19 22:21:02,649 [salt.loaded.int.module.cmdmod][INFO    ][2635] Executing command ['rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'
2016-09-19 22:21:03,124 [salt.state       ][INFO    ][2635] {'ret': {}}
2016-09-19 22:21:03,124 [salt.state       ][INFO    ][2635] Completed state [pkg.upgrade] at time 22:21:03.124381 duration_in_ms=7043.181
2016-09-19 22:21:03,127 [salt.minion      ][INFO    ][2635] Returning information for job: 20160919222055924376

On the master we see nothing:

2016-09-19 22:21:00,951 [salt.master      ][INFO    ][14175] User root Published command saltutil.find_job with jid 20160919222100949159
2016-09-19 22:21:01,081 [salt.utils.job   ][INFO    ][14188] Got return from minion for job 20160919222100949159
2016-09-19 22:21:03,139 [salt.utils.job   ][INFO    ][14177] Got return from minion for job 20160919222055924376

Steps to Reproduce Issue

Remove something that breaks the yum-upgrade-process, for instance a dependancy, some repo or the GPG-key and run the state or module. Watch the salt-minion-logfile report the error and the error-code (1) and watch an empty state or module output on the master, running the job.

Versions Report

My setup is as follows on my master:

[root@master maintenance]# salt-call --versions-report
Salt Version:
           Salt: 2016.3.3

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.5 (default, Sep 14 2016, 08:35:31)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: oracle 7.2
        machine: x86_64
        release: 4.1.12-61.1.6.el7uek.x86_64
         system: Linux
        version: Oracle Linux Server 7.2

My minion:

[root@minion maintenance]# salt-call --versions-report
Salt Version:
           Salt: 2016.3.3

Dependency Versions:
           cffi: 0.8.6
       cherrypy: Not Installed
       dateutil: 1.5
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.7
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.5 (default, Nov 21 2015, 00:39:04)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: oracle 7.2
        machine: x86_64
        release: 4.1.12-37.6.3.el7uek.x86_64
         system: Linux
        version: Oracle Linux Server 7.2
@terminalmage
Copy link
Contributor

As stated in this comment from the issue you linked, this was implemented some time ago. It will not be in any 2016.3 release, but will be in the upcoming release (first RC expected in ~2 weeks).

@rippiedoos
Copy link
Author

Correct, but I didn't get that this was an overlay-bug or -patch and not specific to the apt-subsystem but an overall problem. I thought the patch/fix was implementation-specific to apt and not valid for the yum-system as well. But I'm happy to test again with the RC when it's out!

@gtmanfred gtmanfred added the fixed-pls-verify fix is linked, bug author to confirm fix label Sep 20, 2016
@gtmanfred gtmanfred added this to the Blocked milestone Sep 20, 2016
@terminalmage terminalmage modified the milestones: C 3, Blocked Sep 20, 2016
@terminalmage terminalmage self-assigned this Sep 20, 2016
@terminalmage
Copy link
Contributor

Actually, while the code to check for this newly-added support was added to the pkg.uptodate state, the code that raises errors in such a way that this information is present does not appear to have been added to the upgrade() functions. Looks like I applied it to pkg.install for all pkg providers, but not pkg.upgrade.

Taking care of this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants