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

fixed process grepping fact for scaleio_state.rb #1

Merged
merged 1 commit into from
Nov 17, 2014

Conversation

jonasrosland
Copy link
Contributor

'ps auxw | grep mdm | egrep -v "bash|grep mdm"'
might give a false positive if your hostname contains “mdm” and any of your interfaces are mistakenly set as DHCP, as is the case in a Vagrant environment:

[vagrant@mdm1 ~]$ ps auxw | grep mdm | egrep -v "bash|grep mdm"
root 841 0.0 0.0 9120 124 ? Ss 15:37 0:00 /sbin/dhclient -H mdm1 -1 -q -cf /etc/dhcp/dhclient-eth0.conf -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root 2209 4.3 57.4 1153416 586688 ? SLl 15:37 0:03 /opt/emc/scaleio/mdm/bin/mdm-1.30.426.0 --log_dir /opt/emc/scaleio/mdm/bin/../logs --conf_file /opt/emc/scaleio/mdm/bin/../cfg/conf.txt

This means that even if the mdm process isn't running, since the fact only checks for output it will give a false positive.

With pgrep, you only get the process number, which tells you it’s running, which is what you want:

[vagrant@mdm1 ~]$ pgrep mdm
2209
[vagrant@mdm1 ~]$ pgrep sds
593

@clintkitson clintkitson merged commit ad65d8e into master Nov 17, 2014
sushilrai pushed a commit to sushilrai/puppet-scaleio that referenced this pull request Feb 15, 2018
LUD-62 ScaleIO puppet model to support discover and inventory of scaleIO cluster and node
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

Successfully merging this pull request may close these issues.

2 participants