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

rhel/centos salt-minion yum output in terminal #3855

Closed
inthecloud247 opened this issue Feb 26, 2013 · 11 comments
Closed

rhel/centos salt-minion yum output in terminal #3855

inthecloud247 opened this issue Feb 26, 2013 · 11 comments
Milestone

Comments

@inthecloud247
Copy link
Contributor

I'm using salt 0.13.1 on centos 6.3 .

my salt-minion is started using service salt-minion start

Whenever I log into the instance, I notice that salt-related yum output shows up in my terminal.

here's a recent example:

[root@localhost ~]# service salt-minion restart
Stopping salt-minion daemon:                               [  OK  ]
Starting salt-minion daemon:                               [  OK  ]
[root@localhost ~]# salt-call test.pingLoaded plugins: fastestmirror, presto
ervice salt-minion stalt-call test.pingLoaded plugins: fastestmirror, presto
Loaded plugins: fastestmirror, presto
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile

[INFO    ] Loaded configuration file: /etc/salt/minion
[DEBUG   ] loading grain in ['/var/cache/salt/minion/extmods/grains', '/usr/lib/python2.6/site-packages/salt/grains']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/grains, it is not a directory
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Decrypting the current master AES key
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] loading module in ['/var/cache/salt/minion/extmods/modules', '/usr/lib/python2.6/site-packages/salt/modules']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/modules, it is not a directory
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded rh_service as virtual service
[DEBUG   ] Loaded yumpkg as virtual pkg
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded rpm as virtual lowpkg
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded grub_legacy as virtual grub
[DEBUG   ] Loaded rh_ip as virtual ip
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] loading returner in ['/var/cache/salt/minion/extmods/returners', '/usr/lib/python2.6/site-packages/salt/returners']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/returners, it is not a directory
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] loading states in ['/var/cache/salt/minion/extmods/states', '/usr/lib/python2.6/site-packages/salt/states']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/states, it is not a directory
[DEBUG   ] loading render in ['/var/cache/salt/minion/extmods/renderers', '/usr/lib/python2.6/site-packages/salt/renderers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/renderers, it is not a directory
[DEBUG   ] loading output in ['/var/cache/salt/minion/extmods/output', '/usr/lib/python2.6/site-packages/salt/output']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/output, it is not a directory
master: 10.0.2.2
[DEBUG   ] Loaded json_out as virtual json
[DEBUG   ] Loaded yaml_out as virtual yaml
[DEBUG   ] Loaded pprint_out as virtual pprint
local:
    True
[root@localhost ~]\# service salt-minion restart * base: mirror.5ninesolutions.com
 * epel: linux.mirrors.es.net
 * extras: centos.mirror.ndchost.com
 * updates: mirrors.xmission.com
ping 10.0.2.2
Usage: /etc/init.d/salt-minion {start|stop|status|restart|condrestart|reload}
[root@localhost ~]# ping 10.0.2.2
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=63 time=1.02 ms
64 bytes from 10.0.2.2: icmp_seq=2 ttl=63 time=0.235 ms
64 bytes from 10.0.2.2: icmp_seq=3 ttl=63 time=0.235 ms
64 bytes from 10.0.2.2: icmp_seq=4 ttl=63 time=0.308 ms
64 bytes from 10.0.2.2: icmp_seq=5 ttl=63 time=0.245 ms
64 bytes from 10.0.2.2: icmp_seq=6 ttl=63 time=0.308 ms
64 bytes from 10.0.2.2: icmp_seq=7 ttl=63 time=0.221 ms
64 bytes from 10.0.2.2: icmp_seq=8 ttl=63 time=0.236 ms
64 bytes from 10.0.2.2: icmp_seq=9 ttl=63 time=0.233 ms
64 bytes from 10.0.2.2: icmp_seq=10 ttl=63 time=0.262 ms
^C
--- 10.0.2.2 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9396ms
rtt min/avg/max/mdev = 0.221/0.330/1.020/0.232 ms
[root@localhost ~]# vi /etc/salt/minion
[root@localhost ~]# Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 513 k
ping 10.0.2.2Running rpm_check_debug
Loaded plugins: fastestmirror, presto
Loaded plugins: fastestmirror, presto

[root@localhost ~]# 
@inthecloud247
Copy link
Contributor Author

I do have log_level: debug set in my /etc/salt/minion file, if that helps at all. I use the same settings with salt 0.13.1 in ubuntu 12.04-1 LTS without seeing these issues.

@UtahDave
Copy link
Contributor

Thanks for the report!

@inthecloud247
Copy link
Contributor Author

it's not just yum output apparently...

If i use a returner from the salt-master, the returner output ALSO shows in my minion terminal on RHEL/Centos. Still doesn't happen on Ubuntu.

On master:

 salt '*' test.ping -s -t 1 --return local

In minion terminal, I suddenly see:

[root@salt-test ~]# {'fun': 'test.ping', 'jid': '20130227212345183550', 'return': True, 'id': 'oscontrol1', 'success': True}

@terminalmage
Copy link
Contributor

@ydavid365 log_level is for the console, log_level_logfile is for the log file.

@inthecloud247
Copy link
Contributor Author

K. Wasn't aware that there are teo different options. But this isn't expected behavior right?

I'd expect that console output should only show if I'm running salt-minion in non-daemon mode. Regardless, it doesn't exhibit the same behavior across Ubuntu and rhel, and clearly seems to be a bug.

On Mar 3, 2013, at 6:39 PM, Erik Johnson notifications@github.com wrote:

@ydavid365 log_level is for the console, log_level_logfile is for the log file.


Reply to this email directly or view it on GitHub.

@terminalmage
Copy link
Contributor

I believe this happened before in RHEL/CentOS, but I don't remember what was done to fix it. @thatch45, do you remember?

@thatch45
Copy link
Contributor

thatch45 commented Mar 4, 2013

The problem here is what we do to bypass a bug in daemonizing + multiprocessing in python, basically the shell output is not redirected after daemonizing because if it is then the minion crashes when test is displayed in a job execution. So what we need to do is figure out how to redirect stdout + stderr is such a way that does not crash the minion.

@cedwards
Copy link
Contributor

cedwards commented Apr 2, 2013

I just discovered this in my office as well. 0.13.1 on CentOS 6.4.

@thatch45
Copy link
Contributor

thatch45 commented Apr 3, 2013

We might be able to fix this with some of the recent changes to how minion procs get started

@thatch45
Copy link
Contributor

no, the minion still crashes if the output is redirected...

terminalmage pushed a commit that referenced this issue Nov 15, 2013
@inthecloud247
Copy link
Contributor Author

w00t!

On Fri, Nov 15, 2013 at 3:16 AM, Pedro Algarvio notifications@github.comwrote:

Closed #3855 #3855 via 21623bahttps://github.com/saltstack/salt/commit/21623baf469b0908be5b2a31c73b6b3961a84dce
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3855
.

s0undt3ch added a commit that referenced this issue Nov 20, 2013
Salt does not need any of `sys.stdout`, `sys.stderr` and `syslog` logging handlers which are configured by Yum, specially because we're using Yum as an API, not as another CLI tool. Any logging will go through salt's logging handlers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants