Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

traceback when running salt-api unprivileged #52

Closed
SEJeff opened this issue Mar 3, 2013 · 7 comments
Closed

traceback when running salt-api unprivileged #52

SEJeff opened this issue Mar 3, 2013 · 7 comments

Comments

@SEJeff
Copy link

SEJeff commented Mar 3, 2013

Should be easy to fix:

[jeff@omniscience salt-ui]$ salt-api -l debug
[INFO    ] Loaded configuration file: /etc/salt/master
[DEBUG   ] Created pidfile: /var/run/salt-master.pid
[DEBUG   ] Failed to set the ownership of PID file /var/run/salt-master.pid to user root
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/utils/process.py", line 47, in set_pidfile
    os.chown(pidfile, uid, gid)
OSError: [Errno 1] Operation not permitted: '/var/run/salt-master.pid'
Failed to set the ownership of PID file /var/run/salt-master.pid to user root
@whiteinge
Copy link
Contributor

Ah, interesting. That should be a salt-api.pid file instead. Looks like I'm using the PidfileMixin incorrectly. Thank you for the find!

@s0undt3ch
Copy link
Contributor

This is weird. The default pidfile name is being computed ...

Ah!, I think I know what's going on, hint, hint, default config values.... I can take care of this if you don't...

@s0undt3ch
Copy link
Contributor

There's actually 2 places where this could be fixed. The proper one, salt(but we should be careful there) and salt-api(simpler but does not solve the problem at it's root)....

@s0undt3ch
Copy link
Contributor

#53 fixes the above salt-api.pid issue. I won't fix the permissions issue(yet).

@s0undt3ch
Copy link
Contributor

That traceback is shown as part of the debug message, if the debug level is enabled, if not, you just see the permissions message.

So I think this is fixed? @SEJeff ?

whiteinge added a commit that referenced this issue Mar 4, 2013
Provide `salt-api`'s configuration defaults. Refs #52.
@whiteinge
Copy link
Contributor

Thanks, @s0undt3ch !

@s0undt3ch
Copy link
Contributor

No problem!

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

No branches or pull requests

3 participants