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

grains['oscodename'] incorrect for Debian testing. #30123

Closed
optix2000 opened this issue Jan 2, 2016 · 3 comments
Closed

grains['oscodename'] incorrect for Debian testing. #30123

optix2000 opened this issue Jan 2, 2016 · 3 comments
Labels
Bug broken, incorrect, or confusing behavior P2 Priority 2 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@optix2000
Copy link
Contributor

grains['oscodename'] seems to be parsed incorrectly from /etc/os-release on Debian testing, due to the slash in the codename.

For Debian-based distros (or just Debian), the codename should probably be pulled from /etc/debian_version since it's much easier to parse without error.

optix2000@inazuma ~ % cat /etc/debian_version
stretch/sid
optix2000@inazuma ~ % cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux stretch/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
optix2000@inazuma ~ % sudo salt-call grains.get oscodename
local:
    sid
optix2000@inazuma ~ % salt-call --versions-report
Salt Version:
           Salt: 2015.8.3

Dependency Versions:
         Jinja2: 2.8
       M2Crypto: Not Installed
           Mako: 1.0.3
         PyYAML: 3.11
          PyZMQ: 14.4.0
         Python: 2.7.11 (default, Dec  9 2015, 00:29:25)
           RAET: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.4.2
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
        libnacl: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: 1.3.7
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
   python-gnupg: Not Installed
          smmap: Not Installed
        timelib: Not Installed

System Versions:
           dist: debian stretch/sid
        machine: x86_64
        release: 4.3.0-1-amd64
         system: debian stretch/sid
@cachedout
Copy link
Contributor

Sounds good. Obviously, we'll want to proceed conservatively here. Lots of people use this grain for targeting but handling the case of a slash seems sensible.

Did you want to work up a PR for this one, @optix2000 ?

@cachedout cachedout added Bug broken, incorrect, or confusing behavior Platform Relates to OS, containers, platform-based utilities like FS, system based apps labels Jan 4, 2016
@optix2000
Copy link
Contributor Author

Yeah, I'll work up a PR for this. Wanted to see if anyone had any concerns before I started touching it.

@ssgward ssgward added this to the Approved milestone Jan 4, 2016
@rallytime rallytime added severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P2 Priority 2 labels Jan 6, 2016
@optix2000
Copy link
Contributor Author

optix2000 commented May 17, 2016

Looks like this was a bug in what lsb-release returned to salt. This is fixed upstream.

Closing, as not an issue in salt.

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 P2 Priority 2 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

4 participants