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: qubesctl state.show_lowstate and state.show_highstate crashes #1538

Closed
marmarek opened this Issue Dec 25, 2015 · 16 comments

Comments

Projects
None yet
3 participants
@marmarek
Member

marmarek commented Dec 25, 2015

[root@dom0 salt]# qubesctl state.show_highstate
[CRITICAL] Rendering SLS 'base:config' failed: Jinja error: 'NoneType'
object is not iterable
/var/cache/salt/minion/files/base/config/map.jinja(63):

---
[...]
  , grain="os_family"
  , merge=salt['pillar.get']('salt:lookup'))
%}

{## Merge the flavor_map to the default settings ##}
{% do default_settings.salt.update(os_family_map) %}
<======================

{## Merge in salt:lookup pillar ##}
{% set salt_settings = salt['pillar.get'](
    'salt',
    default=default_settings.salt,
[...]

---
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/utils/templates.py", line
306, in render_jinja_tmpl
    output = template.render(**decoded_context)
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line
969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line
742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<template>", line 21, in top-level template code
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line
1013, in make_module
    return TemplateModule(self, self.new_context(vars, shared, locals))
  File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line
1070, in __init__
    self._body_stream = list(template.root_render_func(context))
  File "/var/cache/salt/minion/files/base/config/map.jinja", line 63, in
top-level template code
    {% do default_settings.salt.update(os_family_map) %}
TypeError: 'NoneType' object is not iterable

@marmarek marmarek added this to the Release 3.1 milestone Dec 25, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 25, 2015

Member

Including saltstack/salt#22562 fixes this problem in salt 2015.04, in 2015.08 is probably works out of the box.

Member

marmarek commented Dec 25, 2015

Including saltstack/salt#22562 fixes this problem in salt 2015.04, in 2015.08 is probably works out of the box.

@nrgaway

This comment has been minimized.

Show comment
Hide comment
@nrgaway

nrgaway Dec 25, 2015

I am currently working on this. I just finished a minor cleanup of all the packages and have almost completed setting up a private repo to allow me to test better.

I imagine I should have a fix by the end of this weekend.

nrgaway commented Dec 25, 2015

I am currently working on this. I just finished a minor cleanup of all the packages and have almost completed setting up a private repo to allow me to test better.

I imagine I should have a fix by the end of this weekend.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 25, 2015

Member

Great!

Member

marmarek commented Dec 25, 2015

Great!

@nrgaway

This comment has been minimized.

Show comment
Hide comment
@nrgaway

nrgaway Dec 25, 2015

Can you test last commit to see if it works for you as well (qubesctl state.show_lowstate) . I tested in AppVM, not in dom0 as my dom0 packages are messed up at the moment in effort to get my testing repo working.

If you don't want to have to merge all the commits I have PR's for right now, just try adding that one line to you existing /srv/salt/_modules/topd.py file and then run qubesctl saltutil.sync_all.

BTW, if you ever install a module where you can not call sync_all because of a python exception or such preventing the completion of the sync, just delete the complete salt-minion cache directory (rm -r /var/cache/salt/minion) and then re-run sync_all again.

nrgaway commented Dec 25, 2015

Can you test last commit to see if it works for you as well (qubesctl state.show_lowstate) . I tested in AppVM, not in dom0 as my dom0 packages are messed up at the moment in effort to get my testing repo working.

If you don't want to have to merge all the commits I have PR's for right now, just try adding that one line to you existing /srv/salt/_modules/topd.py file and then run qubesctl saltutil.sync_all.

BTW, if you ever install a module where you can not call sync_all because of a python exception or such preventing the completion of the sync, just delete the complete salt-minion cache directory (rm -r /var/cache/salt/minion) and then re-run sync_all again.

@nrgaway

This comment has been minimized.

Show comment
Hide comment
@nrgaway

nrgaway Dec 25, 2015

Just to be complete, here is the show_lowstate command line I used:

qubesctl state.show_lowstate -l debug --out yaml

nrgaway commented Dec 25, 2015

Just to be complete, here is the show_lowstate command line I used:

qubesctl state.show_lowstate -l debug --out yaml
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 25, 2015

Member

Yes, it fixes the problem :)

Member

marmarek commented Dec 25, 2015

Yes, it fixes the problem :)

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 25, 2015

Member

There is one comment (https://github.com/QubesOS/qubes-mgmt-salt-base-topd/pull/1/files#r48440653) in that PR, other than that it's good to be merged. Other mgmt components are ok.

Member

marmarek commented Dec 25, 2015

There is one comment (https://github.com/QubesOS/qubes-mgmt-salt-base-topd/pull/1/files#r48440653) in that PR, other than that it's good to be merged. Other mgmt components are ok.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 26, 2015

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc21 has been pushed to the r3.1 testing repository for the Fedora fc21 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.1-current-testing

Changes included in this update

Member

marmarek commented Dec 26, 2015

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc21 has been pushed to the r3.1 testing repository for the Fedora fc21 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.1-current-testing

Changes included in this update

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 26, 2015

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc22 has been pushed to the r3.1 testing repository for the Fedora fc22 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.1-current-testing

Changes included in this update

Member

marmarek commented Dec 26, 2015

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc22 has been pushed to the r3.1 testing repository for the Fedora fc22 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.1-current-testing

Changes included in this update

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 26, 2015

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc23 has been pushed to the r3.1 testing repository for the Fedora fc23 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.1-current-testing

Changes included in this update

Member

marmarek commented Dec 26, 2015

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc23 has been pushed to the r3.1 testing repository for the Fedora fc23 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.1-current-testing

Changes included in this update

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 26, 2015

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc20 has been pushed to the r3.1 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

Member

marmarek commented Dec 26, 2015

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc20 has been pushed to the r3.1 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@Rudd-O

This comment has been minimized.

Show comment
Hide comment
@Rudd-O

Rudd-O Dec 26, 2015

I can confirm this update closes this particular bug.

There are other bugs though.

Rudd-O commented Dec 26, 2015

I can confirm this update closes this particular bug.

There are other bugs though.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 11, 2016

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc21 has been pushed to the r3.1 stable repository for the Fedora fc21 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Member

marmarek commented Jan 11, 2016

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc21 has been pushed to the r3.1 stable repository for the Fedora fc21 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 11, 2016

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc22 has been pushed to the r3.1 stable repository for the Fedora fc22 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Member

marmarek commented Jan 11, 2016

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc22 has been pushed to the r3.1 stable repository for the Fedora fc22 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 11, 2016

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc23 has been pushed to the r3.1 stable repository for the Fedora fc23 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Member

marmarek commented Jan 11, 2016

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc23 has been pushed to the r3.1 stable repository for the Fedora fc23 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 11, 2016

Member

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc20 has been pushed to the r3.1 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Member

marmarek commented Jan 11, 2016

Automated announcement from builder-github

The package qubes-mgmt-salt-base-topd-3.1.1-1.fc20 has been pushed to the r3.1 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

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