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

salt bundle for openSUSE MicroOS and openSUSE Tumbleweed #6569

Closed
juliogonzalez opened this issue Feb 2, 2023 · 1 comment
Closed

salt bundle for openSUSE MicroOS and openSUSE Tumbleweed #6569

juliogonzalez opened this issue Feb 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@juliogonzalez
Copy link
Member

Short description

Having the salt bundle for such OS (basically the same code), should allow us to allow both OS and run then as a basic PoC at least.

Details

What I tried without the bundle and openSUSE MicroOS

  1. I used this PR: openSUSE Leap Micro 5.3 and openSUSE MicroOS as clients #6550 (should get merged soon)
  2. Edited /etc/rhn/rhn.con and added web.ssh_use_salt_thin=true at the end. Then restarted all the services (rebooting the Uyuni server is also valid)
  3. Synced the openSUSE microOS channels with spacewalk-common-channels
  4. This creates a bootstrap repository without the bundle, but with the salt-minion package and require dependencies.
  5. Created an openSUSE MicroOS VM, and installed python3 (then rebooted)
  6. Bootstrapping from WebUI fails with the message:
    stderr: "Traceback (most recent call last):
      File "/var/tmp/.root_9ee12e_salt/salt-call", line 27, in <module>
        salt_call()
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/scripts.py", line 426, in salt_call
        import salt.cli.call
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/cli/call.py", line 3, in <module>
        import salt.cli.caller
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/cli/caller.py", line 14, in <module>
        import salt.loader
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/loader/__init__.py", line 15, in <module>
        import salt.config
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/config/__init__.py", line 101, in <module>
        _DFLT_IPC_WBUFFER = _gather_buffer_space() * 0.5
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/config/__init__.py", line 89, in _gather_buffer_space
        import salt.grains.core
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/grains/core.py", line 33, in <module>
        import salt.modules.cmdmod
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/modules/cmdmod.py", line 31, in <module>
        import salt.utils.templates
      File "/var/tmp/.root_9ee12e_salt/pyall/salt/utils/templates.py", line 12, in <module>
        import jinja2
      File "/var/tmp/.root_9ee12e_salt/pyall/jinja2/__init__.py", line 33, in <module>
        from jinja2.environment import Environment, Template
      File "/var/tmp/.root_9ee12e_salt/pyall/jinja2/environment.py", line 15, in <module>
        from jinja2 import nodes
      File "/var/tmp/.root_9ee12e_salt/pyall/jinja2/nodes.py", line 19, in <module>
        from jinja2.utils import Markup
      File "/var/tmp/.root_9ee12e_salt/pyall/jinja2/utils.py", line 667, in <module>
        from markupsafe import Markup, escape, soft_unicode
      File "/var/tmp/.root_9ee12e_salt/py3/markupsafe/__init__.py", line 13, in <module>
        from collections import Mapping
    ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)", stdout: ""
    

My guess is that we push our current salt 3004 for salt-ssh, and it doesn't work with the current python3.10 that Tumbleweed provides.
7. As an alternative, I installed salt-minion manually on the VM, then configured /etc/salt/minion/ to point to my Salt Master, and restarted salt-minion. With that, the master saw the minion key, and I could accept it from the Uyuni UI.
8. At that point the communication is broken:
At the master I saw:

 2023-02-02 14:59:46,781 [salt.master      :1644][ERROR   ][14929] Received minion error from [n241.mgr.suse.de]: The minion function caused an exception

At the minion I saw:

2023-02-02 13:59:40,493 [tornado.general  :568 ][WARNING ][1471] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x7ff2600b81f0>
2023-02-02 13:59:46,715 [salt.minion      :2017][WARNING ][1560] The minion function caused an exception
2023-02-02 13:59:46,765 [tornado.general  :568 ][WARNING ][1471] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x7ff2600b8040>
Here my guess is that Salt 3005 from Tumbleweed can't talk with our current Salt 3004 (I know, this is not supported, but in the past some basic functionality worked in such situations)

This list of workarounds could produce a valid minion as soon as we have Salt 3005 at the Uyuni server )when we switch it to openSUSE Leap 15.5 in Summer), but we should better produce a bundle ;-)

@juliogonzalez
Copy link
Member Author

The bundle is available now, and I could do some progress during the hackweek, so closing.

Be aware it's still a PoC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant