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

[BUG] output different with test=true #533

Open
nchauvat opened this issue Apr 7, 2022 · 6 comments
Open

[BUG] output different with test=true #533

nchauvat opened this issue Apr 7, 2022 · 6 comments
Labels

Comments

@nchauvat
Copy link

nchauvat commented Apr 7, 2022

Hi,

I am using salt-formula v1.10.2 with salt 3004 on Debian systems.

When applying the state, the generated salt.list contains the line

deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64] https://repo.saltproject.io/py3/debian/10/amd64/3004 buster main

when testing the state, it tells that I change will be made

          ----------
          line:
              ----------
              new:
                  deb [arch=amd64] https://repo.saltproject.io/py3/debian/10/amd64/3004 buster main
              old:
                  deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64] https://repo.saltproject.io/py3/debian/10/amd64/3004 buster main

this sounds like a false change warning, doesn't it ?

@nchauvat nchauvat added the bug label Apr 7, 2022
@myii
Copy link
Member

myii commented Apr 8, 2022

this sounds like a false change warning, doesn't it ?

@nchauvat No, that's actually expected, after #514 was merged just over half a year ago. You can have a look at the discussion and commit(s) there. I'll close this issue for now but feel free to add any further comments/queries.

@myii myii closed this as completed Apr 8, 2022
@nchauvat
Copy link
Author

nchauvat commented Apr 8, 2022

Hi @myii

I do not understand the link with the PR you point me to. It looks like it is about renaming from saltstack.list to salt.list which is not something I have a problem about. Could you be more specific ?

The problem I have with v1.10.2 is that running with test=true tells it will change something (remove the signed-by part), but applying the state does not actually change anything. Hence my question about a false change warning.

@dafyddj
Copy link
Contributor

dafyddj commented Apr 8, 2022

I have experienced this myself and was going to investigate. AFAICT this is unrelated to #514.

I won't reopen though, as I believe the issue is in the upstream Salt project.

@nchauvat
Copy link
Author

nchauvat commented Apr 8, 2022

Hi @dafyddj

What makes you think the problem lies in Salt ? Is there something I could do to help you investigate ?

@hatifnatt
Copy link
Contributor

hatifnatt commented Apr 8, 2022

There is a plenty of issues with pkgrepo.managed on Debian based systems i.e.:

Therefore this issue is not specific to this formula.

@myii myii reopened this Apr 11, 2022
@myii
Copy link
Member

myii commented Apr 12, 2022

Apologies, @nchauvat -- there have been a number of different problems with the pkgrepo module recently; I got mixed up between them when looking at your output. Thanks to @dafyddj and @hatifnatt for clarifying things.

I've reopened this issue, not because there's a bug with the formula per se -- but one of two things needs to happen first (and ideally both, if time/effort permits):

  1. The Debian-family pkgrepo state needs to be replaced by the file.managed method that @javierbertoli has been providing across other formulas so far:
    1. feat(debian): use keyrings instead of key_ids nginx-formula#289
    2. feat(debian): use repository keyring instead of key_id postgres-formula#322
    3. feat(debian): use repository keyring instead of key_id docker-formula#312
  2. This specific bug encountered with test=true should be reported to the saltstack/salt repo.
    1. I've done some introspection using pudb and it really isn't a pretty situation -- the problem extends even beyond the Salt code and into the python-apt modules.
    2. Briefly, the problem starts here, where sanitizedkwargs comes back without the signed-by=/usr/share/keyrings/salt-archive-keyring.gpg bit.
    3. When test=true, this results in sanitizedkwargs being used to simulate the comparison before and after.

Realistically, number 1 is the obvious resolution here. Number 2 will take a fair bit of time writing the bug report, which I don't have right now.

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

No branches or pull requests

4 participants