Skip to content

2015.8.0: Error writing to /var/log/salt/minion? #27063

Closed

Description

@lorengordon

I just installed salt v2015.8.0 from the rpm hosted at https://repo.saltstack.com/yum, and it seems it's not creating /var/log/salt before attempting to write to the minion log. This results in the warning message, "[WARNING ] Failed to open log file, do you have permission to write to /var/log/salt/minion?". I uninstalled and reinstalled, and got the same behavior. If I manually create the directory, the message goes away and the minion log is created.

I removed v2015.8.0 and installed v2015.5.3 from epel, and it seems to create the directory the first time it attempts to write to the minion log.

# salt-call --local grains.get os
[WARNING ] Failed to open log file, do you have permission to write to /var/log/salt/minion?
local:
    CentOS
# salt-call --local --versions
Salt Version:
           Salt: 2015.8.0

Dependency Versions:
         Jinja2: 2.2.1
       M2Crypto: Not Installed
           Mako: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.5.0
         Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
           RAET: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
        libnacl: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
   python-gnupg: Not Installed
          smmap: Not Installed
        timelib: Not Installed

System Versions:
           dist: centos 6.7 Final
        machine: x86_64
        release: 2.6.32-573.1.1.el6.x86_64
         system: CentOS 6.7 Final

Activity

  1. ssgward commented on Sep 11, 2015

    @ssgward

    @lorengordon - if you do a sudo salt-call do you get the same results?

  2. lorengordon commented on Sep 11, 2015

    @lorengordon
    ContributorAuthor

    Yes. I first saw the issue executing the command as a non-root user with sudo. I then switched to root and ran the command again, but the behavior was the same.

  3. added
    bug
    severity-medium
    cannot-reproduce
    P4
    Core
    on Sep 11, 2015
  4. added this to the Blocked milestone on Sep 11, 2015
  5. jfindlay commented on Sep 11, 2015

    @jfindlay
    Contributor

    @lorengordon, thanks for the report. I have tried to reproduce this on a linode CentOS 6 VM:

    [root@li1046-179 ~]# salt-call --local grains.get os
    local:
        CentOS
    [root@li1046-179 ~]# salt --versions
    Salt Version:
               Salt: 2015.8.0
    
    Dependency Versions:
             Jinja2: unknown
           M2Crypto: Not Installed
               Mako: Not Installed
             PyYAML: 3.11
              PyZMQ: 14.5.0
             Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
               RAET: Not Installed
            Tornado: 4.2.1
                ZMQ: 4.0.5
               cffi: Not Installed
           cherrypy: 3.2.2
           dateutil: Not Installed
              gitdb: Not Installed
          gitpython: Not Installed
              ioflo: Not Installed
            libnacl: Not Installed
       msgpack-pure: Not Installed
     msgpack-python: 0.4.6
       mysql-python: Not Installed
          pycparser: Not Installed
           pycrypto: 2.6.1
             pygit2: Not Installed
       python-gnupg: Not Installed
              smmap: Not Installed
            timelib: Not Installed
    
    System Versions:
               dist: centos 6.7 Final
            machine: x86_64
            release: 4.1.5-x86_64-linode61
             system: CentOS 6.7 Final
  6. jfindlay commented on Sep 11, 2015

    @jfindlay
    Contributor

    @lorengordon, is it possible for you to try with a new, clean VM? Thanks.

  7. lorengordon commented on Sep 11, 2015

    @lorengordon
    ContributorAuthor

    This was a clean VM, but yes, I'll try a few AMIs in AWS to see what happens and try to figure out a pattern.

  8. ssgward commented on Sep 11, 2015

    @ssgward

    @lorengordon - another thing to check for us: what are your permissions on both /var/log and /var/log/salt

    Second question is SELinux installed?

  9. lorengordon commented on Sep 11, 2015

    @lorengordon
    ContributorAuthor

    Permissions were fine, I was otherwise able to create the directory with no problem. And I executed the install as root and ran salt-call as root. This was a fresh install and SELinux had not yet been configured in any way. And as I mentioned 2015.5.3 had no problem on the same system. But it was a custom AMI we create ourselves and we've run into oddball problems with custom AMIs before, so I will gladly try a few others that are more vanilla and report back.

  10. lorengordon commented on Sep 11, 2015

    @lorengordon
    ContributorAuthor

    Oh, rereading the question, /var/log/salt did not exist until I created it manually. That was the problem that generated the warning message. Now, why didn't the directory exist or why didn't it get created on first access? That I don't know.

  11. lorengordon commented on Sep 13, 2015

    @lorengordon
    ContributorAuthor

    Just tested with a generic Amazon Linux AMI (ami-0d4cfd66) and got the same behavior I reported.

  12. 62 remaining items

  13. removed this from the B -1 milestone on Apr 12, 2016
  14. modified the milestones: B -3, B -2 on Apr 25, 2016
  15. modified the milestones: C 10, B -3 on May 9, 2016
  16. modified the milestones: C 7, C 10 on Jun 6, 2016
  17. modified the milestones: C 6, C 7 on Jul 18, 2016
  18. modified the milestones: C 5, C 6 on Aug 8, 2016
  19. dmurphy18 commented on Aug 12, 2016

    @dmurphy18
    Contributor

    @lorengordon @ghost @jmo-learnosity I want to close this issue since testing with the latest release 2016.3.2 the issues with /var/log/salt/minion are resolved. Let me know if there are any objections to closing this issue.

  20. lorengordon commented on Aug 12, 2016

    @lorengordon
    ContributorAuthor

    @dmurphy18, ok, I'll test 2016.3.2 with this in mind shortly.

  21. lorengordon commented on Aug 12, 2016

    @lorengordon
    ContributorAuthor

    Yep, looks good now. /var/log/salt is created, and the error message is no longer reported. Closing, thanks!

    # salt-call --local grains.get os
    local:
        CentOS
    # salt-call --versions-report
    Salt Version:
               Salt: 2016.3.2
    
    Dependency Versions:
               cffi: Not Installed
           cherrypy: Not Installed
           dateutil: Not Installed
              gitdb: Not Installed
          gitpython: Not Installed
              ioflo: Not Installed
             Jinja2: 2.7.3
            libgit2: Not Installed
            libnacl: Not Installed
           M2Crypto: Not Installed
               Mako: Not Installed
       msgpack-pure: Not Installed
     msgpack-python: 0.4.6
       mysql-python: Not Installed
          pycparser: Not Installed
           pycrypto: 2.6.1
             pygit2: Not Installed
             Python: 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
       python-gnupg: Not Installed
             PyYAML: 3.10
              PyZMQ: 14.5.0
               RAET: Not Installed
              smmap: Not Installed
            timelib: Not Installed
            Tornado: 4.2.1
                ZMQ: 4.0.5
    
    System Versions:
               dist: centos 6.8 Final
            machine: x86_64
            release: 2.6.32-642.3.1.el6.x86_64
             system: Linux
            version: CentOS 6.8 Final
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2PackagingPlatformbugseverity-medium

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions