Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1207486

Summary: stop_lock gears have status of "started"
Product: OpenShift Container Platform Reporter: Ma xiaoqiang <xiama>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.2.0CC: bmeng, chunchen, dmcphers, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, mwoodson, pmorie, xiama, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-origin-node-util-1.35.1.1-1.el6op Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1006557 Environment:
Last Closed: 2015-04-06 17:06:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1006557    
Bug Blocks:    

Comment 4 Ma xiaoqiang 2015-04-01 00:37:49 UTC
No, I test with a normal app without jenkins server.

Comment 7 Ma xiaoqiang 2015-04-03 03:21:44 UTC
Check on puddle [2.2.5/2015-04-02.1]

1. Create an app
#rhc app create xiaom4 perl
2. touch .stop_lock file in the app
> touch app-root/runtime/.stop_lock
3. restart the openshift-watchman service 
#service openshift-service restart
4. check the syslog
Apr  3 10:52:56 node2 openshift-platform[23895]: watchman deleted stop lock for gear xiaom-xiaom4-1 because the state of the gear was started
Apr  3 10:52:56 node2 openshift-platform[23895]: watchman deleted stop lock for gear xiaom-xiaom4-1 because the state of the gear was started

> ll app-root/runtime/
build-dependencies/ data/               dependencies/       repo/               .state

The .stop_lock file is deleted.

Comment 9 errata-xmlrpc 2015-04-06 17:06:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0779.html

Comment 10 openshift-github-bot 2015-04-06 20:27:25 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/dda1900d52fc86140a24ac8d4e63cdd6a76550a0
Bug 1207486 - stop_lock gears have status of "started"

The previous code was:

next unless uid != '0' && command =~ /jenkins\/slave.jar/ && ppid == '1'

that's the same as:

next if !(uid != '0' && command =~ /jenkins\/slave.jar/ && ppid == '1')

or:

next if uid == '0' || command !~ /jenkins\/slave.jar/ || ppid != '1'

Which is actually not what we wanted because the jenkins slave check would
short circuit the non-deamon check in the case of stop_lock checks.  The
process would be non-root and non-jenkins related which would cuase it to be
skipped.  We only wanted to do that if the process was not a daemon:

next if uid == '0' || ppid != '1' && command !~ /jenkins\/slave.jar/

That will skip root process, skip things that aren't daemons except for the
jenkins slave process.  The version committed is simply a more commented
version of this.