Bug 1207486 - stop_lock gears have status of "started"
Summary: stop_lock gears have status of "started"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1006557
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-31 02:51 UTC by Ma xiaoqiang
Modified: 2015-04-06 20:27 UTC (History)
11 users (show)

Fixed In Version: openshift-origin-node-util-1.35.1.1-1.el6op
Doc Type: Bug Fix
Doc Text:
Clone Of: 1006557
Environment:
Last Closed: 2015-04-06 17:06:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0779 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.5 bug fix and enhancement update 2015-04-06 21:05:45 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.