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

DeprecationWarning: Please stop importing 'salt.utils.psutil_compat' and instead import 'psutil' directly as there's no longer a need for a compatability layer #9459

Open
Nurmagoz opened this issue Sep 20, 2024 · 6 comments
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: mgmt needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: major Priority: major. Between "default" and "critical" in severity. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@Nurmagoz
Copy link

How to file a helpful issue

Qubes OS release

4.2.3 (R4.2)

Steps to reproduce

[user@dom0 ~]$ sudo qubesctl --show-output state.sls update.qubes-dom0
/usr/lib/python3.11/site-packages/salt/utils/psutil_compat.py:16: DeprecationWarning: Please stop importing 'salt.utils.psutil_compat' and instead import 'psutil' directly as there's no longer a need for a compatability layer. The 'salt.utils.psutil_compat' will go away on Salt 3008.0 (Argon).
  salt.utils.versions.warn_until(
local:
----------
          ID: /etc/yum.repos.d/qubes-dom0.repo
    Function: file.replace
      Result: True
     Comment: No changes needed to be made
     Started: 14:28:36.603920
    Duration: 68.045 ms
     Changes:   
----------
          ID: /etc/yum.repos.d/qubes-templates.repo
    Function: file.replace
      Result: True
     Comment: No changes needed to be made
     Started: 14:28:36.672076
    Duration: 2.058 ms
     Changes:   
----------
          ID: update
    Function: cmd.script
      Result: True
     Comment: Cache cleaned
     Started: 14:28:36.698430
    Duration: 4971.033 ms
     Changes:   
----------
          ID: update
    Function: pkg.uptodate
      Result: True
     Comment: System is already up-to-date
     Started: 14:28:44.709320
    Duration: 295479.882 ms
     Changes:   

Summary for local
------------
Succeeded: 4
Failed:    0
------------
Total states run:     4
Total run time: 300.521 s
[user@dom0 ~]$ 


@Nurmagoz Nurmagoz added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Sep 20, 2024
@andrewdavidwong andrewdavidwong added C: mgmt needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.2 This issue affects Qubes OS 4.2. labels Sep 21, 2024
@RhizomaticNomad
Copy link

RhizomaticNomad commented Nov 25, 2024

I came across this issue because I've suddenly had the same error messages today while executing qubesctl on my user_salt states. Though it was followed by
[CRITICAL] Specified ext_pillar interface qvm_features is unavailable
[CRITICAL] Specified ext_pillar interface qvm_prefs is unavailable
[CRITICAL] Specified ext_pillar interface qvm_tags is unavailable
and then again
/usr/lib/python3.11/site-packages/salt/utils/psutil_compat.py:16: DeprecationWarning: Please stop importing 'salt.utils.psutil_compat' and instead import 'psutil' directly as there's no longer a need for a compatability layer. The 'salt.utils.psutil_compat' will go away on Salt 3008.0 (Argon). salt.utils.versions.warn_until(
In this Issue [https://github.com//issues/8491] someone suggested sudo qubesctl saltutil.sync_all and I assume this resolved the error, at least for me. (TBH, I've also run qubesctl state.sls qubes.user-dirs and don't know which command really fixed the issue).
But as you want to run the update.qubes-dom0 where no user env is involved, maybe sudo qubesctl saltutil.sync_all fixes your issue? For me it did, the update.qubes-dom0 gave me the same error mentioned above but works for me after doing the saltutil.sync_all.

@Solomon1732
Copy link

Solomon1732 commented Nov 26, 2024

I got the same warning when I ran the GUI update for dom0. The update itself was successful despite it. I will restart Qubes, run the qubesctl command, and restart Qubes again for good measure. I hope the warning won't show in the next update. Time will tell.

I update my Qubes 4.2 regularly, so I don't know what minor version I use.

Edit: Didn't work. I still get the warning.

@andrewdavidwong andrewdavidwong added P: major Priority: major. Between "default" and "critical" in severity. and removed P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Nov 29, 2024
@andrewdavidwong andrewdavidwong pinned this issue Nov 29, 2024
@DemiMarie
Copy link

@Solomon1732 Does sudo qubesctl saltutil.sync_all fix it?

@Solomon1732
Copy link

No. I wrote as much in the the edited part of my above message.

@Solomon1732
Copy link

Update: I updated Qubes again to the latest packages. This time the warning did not show up. I have no idea why.

@Nurmagoz
Copy link
Author

looks like fixed from my side (template is fedora 41):

[user@dom0 ~]$ sudo qubesctl --show-output state.sls update.qubes-dom0
local:
----------
          ID: /etc/yum.repos.d/qubes-dom0.repo
    Function: file.replace
      Result: True
     Comment: No changes needed to be made
     Started: 21:13:15.095080
    Duration: 7.534 ms
     Changes:   
----------
          ID: /etc/yum.repos.d/qubes-templates.repo
    Function: file.replace
      Result: True
     Comment: No changes needed to be made
     Started: 21:13:15.102706
    Duration: 1.183 ms
     Changes:   
----------
          ID: update
    Function: cmd.script
      Result: True
     Comment: Cache cleaned
     Started: 21:13:15.104344
    Duration: 4132.435 ms
     Changes:   
----------
          ID: update
    Function: pkg.uptodate
      Result: True
     Comment: System is already up-to-date
     Started: 21:13:20.164962
    Duration: 46122.591 ms
     Changes:   

Summary for local
------------
Succeeded: 4
Failed:    0
------------
Total states run:     4
Total run time:  50.264 s
[user@dom0 ~]$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: mgmt needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: major Priority: major. Between "default" and "critical" in severity. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

5 participants