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

pkg.installed salt state fails with yum error message #2223

Closed
woju opened this Issue Aug 2, 2016 · 9 comments

Comments

@woju
Member

woju commented Aug 2, 2016

Qubes OS version (e.g., R3.1):

R3.2-rc2

Affected TemplateVMs (e.g., fedora-23, if applicable):

the issue is entirely in dom0


Expected behavior:

pkg.installed salt state module function works as advertised.

Actual behavior:

pkg.installed fails.

Steps to reproduce the behavior:

packages-dom0:
  pkg.installed:
    - pkgs:
      - terminus-fonts

Note that terminus-fonts package is arbitrary, probably any package triggers this bug.

General notes:

The error message contains yum help and the note suggesting some command line parameters are wrong.


Related issues:

@woju woju added the bug label Aug 2, 2016

@woju woju added this to the Release 3.2 milestone Aug 2, 2016

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 5, 2016

Member

Are you using debian-based VM as updatevm?

Member

marmarek commented Aug 5, 2016

Are you using debian-based VM as updatevm?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 5, 2016

Member

Or maybe VM with outdated qubes-core-vm package? Like from R3.1.

Member

marmarek commented Aug 5, 2016

Or maybe VM with outdated qubes-core-vm package? Like from R3.1.

@vladimir-lu

This comment has been minimized.

Show comment
Hide comment
@vladimir-lu

vladimir-lu Apr 7, 2018

This seems closest to the issue I'm facing right now on R4.

If you have a salt state that installs packages in dom0, then dom0 will use the updates proxy to get the packages. In my case, this is sys-whonix (jessie). This has yum installed but the output complains that --best is not an option. --best is only used in the qubes-download-dom0-updates.sh script when dnf is detected but dnf is clearly not installed in this whonix version. Some parameters are however passed from the salt yum module directly - specifically in yumpkg.py when salt detects that dnf is available it uses those options: https://github.com/saltstack/salt/blob/17e5a568bcd13d2b866f86512f9a4aa519392bd5/salt/modules/yumpkg.py#L1654

This gets passed into the updates proxy as an option and subsequently fails because of course these are invalid in yum. So you have dom0 with dnf and the updates proxy without.

I've made a local workaround where I remove those options if found from the $OPTIONS in the qubes-download-dom0-updates.sh script - maybe I will make a PR :)

This seems closest to the issue I'm facing right now on R4.

If you have a salt state that installs packages in dom0, then dom0 will use the updates proxy to get the packages. In my case, this is sys-whonix (jessie). This has yum installed but the output complains that --best is not an option. --best is only used in the qubes-download-dom0-updates.sh script when dnf is detected but dnf is clearly not installed in this whonix version. Some parameters are however passed from the salt yum module directly - specifically in yumpkg.py when salt detects that dnf is available it uses those options: https://github.com/saltstack/salt/blob/17e5a568bcd13d2b866f86512f9a4aa519392bd5/salt/modules/yumpkg.py#L1654

This gets passed into the updates proxy as an option and subsequently fails because of course these are invalid in yum. So you have dom0 with dnf and the updates proxy without.

I've made a local workaround where I remove those options if found from the $OPTIONS in the qubes-download-dom0-updates.sh script - maybe I will make a PR :)

vladimir-lu added a commit to vladimir-lu/qubes-core-agent-linux that referenced this issue Apr 7, 2018

Problem: Unable to use pkg.install with Salt in dom0 when using Updat…
…eVM that has only yum due to incorrect options passed by Salt assuming dnf presence

Solution: Filter out invalid yum options when dnf is not found in UpdateVM

Fixes QubesOS/qubes-issues#2223

vladimir-lu added a commit to vladimir-lu/qubes-core-agent-linux that referenced this issue Apr 7, 2018

Problem: Unable to use pkg.install with Salt in dom0 when using Updat…
…eVM that has only yum due to incorrect options passed by Salt assuming dnf presence

Solution: Filter out invalid yum options when dnf is not found in UpdateVM

Fixes QubesOS/qubes-issues#2223

vladimir-lu added a commit to vladimir-lu/qubes-core-agent-linux that referenced this issue Apr 7, 2018

Problem: Unable to use pkg.install with Salt in dom0 when using Updat…
…eVM that has only yum due to incorrect options passed by Salt assuming dnf presence

Solution: Filter out invalid yum options when dnf is not found in UpdateVM

Fixes QubesOS/qubes-issues#2223
@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Apr 21, 2018

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.25-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.25-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Apr 21, 2018

Automated announcement from builder-github

The package qubes-core-agent_4.0.25-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.25-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot May 2, 2018

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot May 21, 2018

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.28-1.fc26) has been pushed to the r4.0 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.28-1.fc26) has been pushed to the r4.0 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot May 21, 2018

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 stable repository for the Fedora centos7 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 stable repository for the Fedora centos7 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot May 21, 2018

Automated announcement from builder-github

The package qubes-core-agent_4.0.28-1+deb9u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.28-1+deb9u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

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