openshift / origin-server

OpenShift 2 (deprecated)
889 stars 516 forks source link

Bug 1160934 - "oo-admin-ctl-gears stopgear" failed to stop idled gear #6335

Closed dinhxuanvu closed 8 years ago

dinhxuanvu commented 8 years ago

During the 'idlegear' operation, the gear in fact is stopped but the state value is changed to 'idle'. Then, subsequently, when 'stopgear' operation is excuted, the cartridge doesn't perform any extra works as the gear is already stopped. However, the state is not modified to 'stopped' due to lacking of explicit state change in application container itself.

This commit will add explicit state change to application container to ensuring the state is changed accordingly.

Bug 1160934 Link https://bugzilla.redhat.com/show_bug.cgi?id=1160934

Signed-off-by: Vu Dinh vdinh@redhat.com

dinhxuanvu commented 8 years ago

[test]

dinhxuanvu commented 8 years ago

re-[test]

openshift-bot commented 8 years ago

Evaluated for online test up to f557bd3ce2b05a6380a9650acd3f1db5fd67d772

openshift-bot commented 8 years ago

Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9106/)

dinhxuanvu commented 8 years ago

@Miciah @tiwillia Ready for review and merge. Thanks!

dinhxuanvu commented 8 years ago

@Miciah @tiwillia Wonder if I can have a LGTM and merge for this PR :D...

tiwillia commented 8 years ago

This LGTM. Tested myself and I see no problems.

Good job on this @dinhxuanvu

One quick note, it looks like oo-idler-stats may be broken. During my testing I thought your change may have broken it, but after reverting the change I still see this error after manually idling a gear:

# oo-idler-stats 
Traceback (most recent call last):
  File "/usr/sbin/oo-idler-stats", line 251, in <module>
    if is_idled(users[uid]):
  File "/usr/sbin/oo-idler-stats", line 80, in is_idled
    all_idled_apps.remove('')
ValueError: list.remove(x): x not in list

[merge]

openshift-bot commented 8 years ago

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/6668/) (Image: devenv_5735)

openshift-bot commented 8 years ago

Evaluated for online merge up to f557bd3ce2b05a6380a9650acd3f1db5fd67d772