DeepSea icon indicating copy to clipboard operation
DeepSea copied to clipboard

Check for zypper lock before trying to run zypper {info,install,update,...}

Open smithfarm opened this issue 6 years ago • 0 comments

A user reports:

during the execution of stage 0 the “/var/log/deepsea.log” shows several occurrences of errors when calling “/usr/bin/zypper”:

2017-10-05 07:49:38,185 [INFO] deepsea.monitor: Start stage:
ceph.stage.0 jid=20171005074921707802
2017-10-05 07:49:38,187 [INFO] deepsea.monitor: Started Runner step:
[-1/97] name=validate.setup()
2017-10-05 07:49:38,197 [INFO] deepsea.monitor: FOUND DUPLICATE:
validate.setup()
2017-10-05 07:49:38,197 [INFO] deepsea.monitor: Started State step:
[-1/97] name=cmd.shell(/usr/bin/zypper info ceph) on=['ses-node06',
'ses-node01', 'ses-node15', 'ses-node07', 'ses-node04', 'ses-node05', 
'
ses-node02', 'ses-node03', 'ses-node12', 'ses-node11', 'ses-node08',
'ses-node09']
2017-10-05 07:49:38,198 [INFO] deepsea.monitor: Started State step:
[-1/97] name=cmd.shell(/usr/bin/zypper info ceph) on=['ses-node06',
'ses-node01', 'ses-node15', 'ses-node07', 'ses-node04', 'ses-node05', 
'
ses-node02', 'ses-node03', 'ses-node12', 'ses-node11', 'ses-node08',
'ses-node09']
2017-10-05 07:49:38,199 [INFO] deepsea.monitor: Finished State step:
[-1/97] name=cmd.shell(/usr/bin/zypper info ceph) in=ses-node12
success=False
2017-10-05 07:49:38,199 [INFO] deepsea.monitor: State step error:
{'data': {'_stamp': '2017-10-05T07:49:26.826754',
          'cmd': '_return',
          'fun': 'cmd.shell',
          'fun_args': ['/usr/bin/zypper info ceph'],
          'id': 'ses-node12',
          'jid': '20171005074926770438',
          'retcode': 7,
          'return': 'System management is locked by the application
with pid 27554 (/usr/bin/zypper).\nClose this application before
trying again.',
          'success': True},
'tag': 'salt/job/20171005074926770438/ret/ses-node12'}
2017-10-05 07:49:38,199 [INFO] deepsea.monitor: Finished State step:
[-1/97] name=cmd.shell(/usr/bin/zypper info ceph) in=ses-node06
success=False
2017-10-05 07:49:38,200 [INFO] deepsea.monitor: State step error:
{'data': {'_stamp': '2017-10-05T07:49:26.827418',
          'cmd': '_return',
          'fun': 'cmd.shell',
          'fun_args': ['/usr/bin/zypper info ceph'],
          'id': 'ses-node06',
          'jid': '20171005074926770438',
          'retcode': 7,
          'return': 'System management is locked by the application
with pid 28181 (/usr/bin/zypper).\nClose this application before
trying again.',
          'success': True},
'tag': 'salt/job/20171005074926770438/ret/ses-node06'}
2017-10-05 07:49:38,200 [INFO] deepsea.monitor: Finished State step:
[-1/97] name=cmd.shell(/usr/bin/zypper info ceph) in=ses-node15
success=False

and follow-up comments: "it happen repeatedly on different nodes (this was only an example). It also happen in different stages. When you login to the respective node the process is no longer running, that's why it do not lead to an error in a stage at all. But you get many error messages in the deapsea.log. I think it would be better to check first if a zypper lock still exists before executing the zypper command."

smithfarm avatar Oct 05 '17 14:10 smithfarm