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] Snap.installed not avalable in 3001 #58132

Open
cwray opened this issue Aug 5, 2020 · 7 comments
Open

[BUG] Snap.installed not avalable in 3001 #58132

cwray opened this issue Aug 5, 2020 · 7 comments
Labels
Bug broken, incorrect, or confusing behavior Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases severity-high 2nd top severity, seen by most users, causes major problems

Comments

@cwray
Copy link

cwray commented Aug 5, 2020

Description
State snap.installed is missing from 3001. Ubuntu and many other communities are using snaps more and more.

This is extremely needed as time goes on.

Case and point. Some maintainers are moving exclusively to snaps and away from standard repositories and PPA's because they are supported on most platforms.
certbot/certbot#7950

Certbot.sls

add_certbot_snap:
  snap.installed:
    - name: certbot

Run state

doot@salt-master:~# salt 'salt-min*' state.apply certbot 
salt-min.lxd:
----------
          ID: add_certbot_snap
    Function: snap.installed
        Name: certbot
      Result: False
     Comment: State 'snap.installed' was not found in SLS 'certbot'
              Reason: 'snap.installed' is not available.
     Changes:   

Versions Report

doot@salt-master:~# salt -V
Salt Version:
           Salt: 3001
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.7.3
      docker-py: Not Installed
          gitdb: 2.0.6
      gitpython: 3.0.7
         Jinja2: 2.10.1
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: Not Installed
   pycryptodome: 3.6.1
         pygit2: Not Installed
         Python: 3.8.2 (default, Jul 16 2020, 14:00:26)
   python-gnupg: 0.4.5
         PyYAML: 5.3.1
          PyZMQ: 18.1.1
          smmap: 2.0.5
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.2
 
System Versions:
           dist: ubuntu 20.04 focal
         locale: utf-8
        machine: x86_64
        release: 5.0.0-32-generic
         system: Linux
        version: Ubuntu 20.04 focal
@cwray cwray added the Bug broken, incorrect, or confusing behavior label Aug 5, 2020
@garethgreenaway
Copy link
Contributor

@cwray Thanks for the report. The snap state was contributed to the develop branch and there is a pending PR to bring it into the master branch, #56953. Once it has tests and ensuring those tests are passing, the PR will be merged and the feature will be available in an upcoming release.

@sagetherage sagetherage added the Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label Aug 7, 2020
@sagetherage sagetherage added this to the Magnesium milestone Aug 7, 2020
@sagetherage sagetherage added the severity-high 2nd top severity, seen by most users, causes major problems label Aug 7, 2020
@cwray
Copy link
Author

cwray commented Aug 7, 2020

Sweet, thank you guys for your hard work.

@sagetherage sagetherage added the Magnesium Mg release after Na prior to Al label Sep 10, 2020
@sagetherage
Copy link
Contributor

De-scoping this from the Magnesium release since there hasn't been time to write a test case in the Port to Master PR, yet

@sagetherage sagetherage removed the Magnesium Mg release after Na prior to Al label Sep 18, 2020
@sagetherage sagetherage modified the milestones: Magnesium, Approved Sep 18, 2020
@sagetherage sagetherage added the Phosphorus v3005.0 Release code name and version label Jun 18, 2021
@sagetherage sagetherage modified the milestones: Approved, Phosphorus Jun 18, 2021
@Ch3LL Ch3LL removed the Phosphorus v3005.0 Release code name and version label Mar 30, 2022
@cwray
Copy link
Author

cwray commented Jun 28, 2022

Has the snap integration lost traction? This would still be a wonderful feature to have in salt.

@joshenders
Copy link

Anything we can do to help this land in Sulphur v3006.0?

@koenr
Copy link

koenr commented Feb 26, 2023

As a poor men solution, I use

jammy_install:

# snaps
  cmd.run:
    - names: 
## audacity
       - snap install audacity
       - snap connect audacity:alsa

@lkubb
Copy link
Contributor

lkubb commented Sep 26, 2024

For anyone that followed this, I just released a Salt extension for Snapd: https://github.com/salt-extensions/saltext-snap

It should be much more comprehensive than the previous unported modules since it interfaces with the REST API in addition to the CLI, depending on the query/operation, and offers several states in addition to installed/removed (such as connected and service_running with mod_watch support).

I don't expect this issue to be fixed in Salt core (see great module migration).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases severity-high 2nd top severity, seen by most users, causes major problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants