Bug 1222865

Summary: [origin_infrastructure_323] The event of marking node as schedulable/unschedulable are not logged.
Product: OKD Reporter: Liang Xia <lxia>
Component: LoggingAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: Jianwei Hou <jhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: libra-bugs
Target Milestone: ---   
Target Release: 3.x   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-07 23:47:06 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:

Description Liang Xia 2015-05-19 10:23:09 UTC
Description of problem:
Marking node as schedulable/unschedulable, 
the node status are changed accordingly,
But the events are not logged.

devenv-fedora_1563
osc v0.5.1-174-g044b89a
kubernetes v0.17.0-144-g25d32ee

How reproducible:
Always

Steps to Reproduce:
1.Setup the environment.
2.Check the nodes.
$ osc get nodes
3.Mark node as unschedulable.
$ openshift admin manage-node --schedulable=false
4.Check the node.
5.Mark node as schedulable.
$ openshift admin manage-node --schedulable=true
6.Check the node.
7.Check the events.
$ osc get events

Actual results:
Node status are changed accordingly, but the events are not logged.

Expected results:
Changing node to schedulable/unschedulable should be logged.

Additional info:
"kubectl get events" can get the log of node status change to schedulable/unschedulable.

Comment 1 Ravi Sankar 2015-05-19 19:33:02 UTC
I'm running openshift all in one vagrant setup and it works for me. 
<snip>
[vagrant@openshiftdev origin]$ openshift version
openshift v0.5.1-227-gf104d7c-dirty
kubernetes v0.17.0-441-g6b6b47a

[vagrant@openshiftdev origin]$ openshift admin manage-node --schedulable=false
NAME                 LABELS    STATUS
openshiftdev.local   <none>    Ready,SchedulingDisabled

[vagrant@openshiftdev origin]$ openshift admin manage-node --schedulable=true
NAME                 LABELS    STATUS
openshiftdev.local   <none>    Ready

[vagrant@openshiftdev origin]$ openshift cli get events
FIRSTSEEN                         LASTSEEN                          COUNT     NAME                 KIND      SUBOBJECT   REASON          SOURCE                         MESSAGE
Tue, 19 May 2015 19:20:05 +0000   Tue, 19 May 2015 19:20:05 +0000   1         openshiftdev.local   Node                  starting        {kubelet openshiftdev.local}   Starting kubelet.
Tue, 19 May 2015 19:20:07 +0000   Tue, 19 May 2015 19:20:07 +0000   1         openshiftdev.local   Node                  online          {kubelet openshiftdev.local}   Node openshiftdev.local is now online
Tue, 19 May 2015 19:21:25 +0000   Tue, 19 May 2015 19:21:25 +0000   1         openshiftdev.local   Node                  unschedulable   {kubelet openshiftdev.local}   Node openshiftdev.local is now unschedulable
Tue, 19 May 2015 19:21:44 +0000   Tue, 19 May 2015 19:21:44 +0000   1         openshiftdev.local   Node                  schedulable     {kubelet openshiftdev.local}   Node openshiftdev.local is now schedulable
</snip>

Comment 2 Liang Xia 2015-05-20 07:31:38 UTC
Check on the latest build, this has been fixed. Move to verified.

[root@ip-10-157-109-23 openshift]# openshift version
openshift v0.5.2-8-g31e42ed
kubernetes v0.17.0-441-g6b6b47a

[root@ip-10-157-109-23 openshift]# osc get nodes
NAME               LABELS    STATUS
ip-10-157-109-23   <none>    Ready

[root@ip-10-157-109-23 openshift]# openshift admin manage-node --schedulable=false
NAME               LABELS    STATUS
ip-10-157-109-23   <none>    Ready,SchedulingDisabled

[root@ip-10-157-109-23 openshift]# openshift admin manage-node --schedulable=true
NAME               LABELS    STATUS
ip-10-157-109-23   <none>    Ready

[root@ip-10-157-109-23 openshift]# openshift cli get events
FIRSTSEEN                         LASTSEEN                          COUNT     NAME               KIND      SUBOBJECT   REASON          SOURCE                       MESSAGE
Wed, 20 May 2015 07:27:42 +0000   Wed, 20 May 2015 07:27:42 +0000   1         ip-10-157-109-23   Node                  starting        {kubelet ip-10-157-109-23}   Starting kubelet.
Wed, 20 May 2015 07:27:43 +0000   Wed, 20 May 2015 07:27:43 +0000   1         ip-10-157-109-23   Node                  online          {kubelet ip-10-157-109-23}   Node ip-10-157-109-23 is now online
Wed, 20 May 2015 07:28:45 +0000   Wed, 20 May 2015 07:28:45 +0000   1         ip-10-157-109-23   Node                  unschedulable   {kubelet ip-10-157-109-23}   Node ip-10-157-109-23 is now unschedulable
Wed, 20 May 2015 07:28:53 +0000   Wed, 20 May 2015 07:28:53 +0000   1         ip-10-157-109-23   Node                  schedulable     {kubelet ip-10-157-109-23}   Node ip-10-157-109-23 is now schedulable

[root@ip-10-157-109-23 openshift]# osc get events
FIRSTSEEN                         LASTSEEN                          COUNT     NAME               KIND      SUBOBJECT   REASON          SOURCE                       MESSAGE
Wed, 20 May 2015 07:27:42 +0000   Wed, 20 May 2015 07:27:42 +0000   1         ip-10-157-109-23   Node                  starting        {kubelet ip-10-157-109-23}   Starting kubelet.
Wed, 20 May 2015 07:27:43 +0000   Wed, 20 May 2015 07:27:43 +0000   1         ip-10-157-109-23   Node                  online          {kubelet ip-10-157-109-23}   Node ip-10-157-109-23 is now online
Wed, 20 May 2015 07:28:45 +0000   Wed, 20 May 2015 07:28:45 +0000   1         ip-10-157-109-23   Node                  unschedulable   {kubelet ip-10-157-109-23}   Node ip-10-157-109-23 is now unschedulable
Wed, 20 May 2015 07:28:53 +0000   Wed, 20 May 2015 07:28:53 +0000   1         ip-10-157-109-23   Node                  schedulable     {kubelet ip-10-157-109-23}   Node ip-10-157-109-23 is now schedulable