saltstack / saltstack/salt

[BUG] system.reboot_required_witnessed sticks on True after setting it and rebooting

Open
#58,125 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug has-failing-test needs-testcase severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
system.get_reboot_required_witnessed returns always true once set.

Setup

  • QEMU/kvm virtual machine, master and minion on same machine
  • happens also with master and minion on different machines

Config files:

/etc/salt/master:
interface: 127.0.0.1

/etc/salt/minion:
master: 127.0.0.1
id: localminion

Steps to Reproduce the behavior

  • start and enable both master and minion services
  • accept minion key
[tqre@salt-debug ~]$ sudo salt '*' system.get_reboot_required_witnessed
localminion:
    False
[tqre@salt-debug ~]$ sudo salt '*' system.set_reboot_required_witnessed
localminion:
    True
[tqre@salt-debug ~]$ sudo reboot
Connection to 192.168.0.10 closed by remote host.
Connection to 192.168.0.10 closed.
...reconnect after machine has booted...
[tqre@salt-debug ~]$ sudo salt '*' system.get_reboot_required_witnessed
localminion:
    True

Expected behavior
system.reboot_required_witnessed should reset to False after reboot.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
           Salt: 3001

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.11.2
        libgit2: Not Installed
       M2Crypto: 0.36.0
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 1.0.0
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: Not Installed
   pycryptodome: 3.9.7
         pygit2: Not Installed
         Python: 3.8.5 (default, Jul 27 2020, 08:42:51)
   python-gnupg: Not Installed
         PyYAML: 5.3.1
          PyZMQ: 19.0.1
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.2

System Versions:
           dist: arch
         locale: utf-8
        machine: x86_64
        release: 5.7.12-arch1-1
         system: Linux
        version: Arch Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementations of system.get_reboot_required_witnessed and system.set_reboot_required_witnessed, then trace how their state survives the reboot described in the reproduction. Re-run the commands before and after reboot; done means the getter returns False after the minion restarts while still returning True immediately after setting the witness.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.