Description of problem: Restart master serivce could not fix the invalid hostip in hostsubnet Version-Release number of selected component (if applicable): openshift v3.6.126.1 kubernetes v1.6.1+5115d708d7 etcd 3.2.0 How reproducible: Always Steps to Reproduce: 1. Setup OCP env # oc get hostsubnet NAME HOST HOST IP SUBNET ip-172-18-10-83.ec2.internal ip-172-18-10-83.ec2.internal 172.18.10.83 10.129.0.0/23 ip-172-18-5-230.ec2.internal ip-172-18-5-230.ec2.internal 172.18.5.230 10.128.0.0/23 2. Change hostip in hostsubnet on master1 node equal to the ip of its tun0 [root@ip-172-18-5-230 ~]# oc get hostsubnet NAME HOST HOST IP SUBNET ip-172-18-10-83.ec2.internal ip-172-18-10-83.ec2.internal 10.128.0.1 10.129.0.0/23 ip-172-18-5-230.ec2.internal ip-172-18-5-230.ec2.internal 172.18.5.230 10.128.0.0/23 3. Restart master/node service Actual results: The invalid hostip in hostsubnet could not be fixed after restarting master service Expected results: The invalid hostip in hostsubnet could be fixed after restarting master service Additional info: https://bugzilla.redhat.com/show_bug.cgi?id=1295486 And it is working well in OCP v3.5.5.28 Attached master log
Created attachment 1292838 [details] masterlog
(In reply to Yan Du from comment #0) > Actual results: > The invalid hostip in hostsubnet could not be fixed after restarting master > service > > Expected results: > The invalid hostip in hostsubnet could be fixed after restarting master > service Can you be more clear about what you expected to happen and what actually happened?
The current behavior seems to be that if you have an invalid HostSubnet and restart the master, then it will log an error (but continue, so that you can then fix the hostsubnet), and if you restart the node that the bad HostSubnet is assigned to, it will fail to start. I believe that behavior is correct.
I wouldn't think restarting the master should make any difference. It can't know what addresses are valid on the nodes, so the old behavior was weird. However, I tried setting a bad address for a node in the hostsubnet and restarting the node process. It did not seem to detect the error. If it complained and failed to start, that would be fine. I bet this is related to the change @rchopra made to try to preserve any local address rather than always forcing one. https://github.com/openshift/origin/pull/12388
(In reply to Ben Bennett from comment #5) > I bet this is related to the change @rchopra made to try to preserve any > local address rather than always forcing one. That was my first guess too, but it's wrong. Bisecting shows it was caused by https://github.com/openshift/origin/commit/8c7065f (which messed up the SDN master's permissions), but Clayton's fix in https://github.com/openshift/origin/pull/14968 does not fix it. Still investigating.
Easy fix. https://github.com/openshift/origin/pull/14979
Test on latest OCP env, invalid hostip could be fixed after restart master service. openshift v3.6.133 kubernetes v1.6.1+5115d708d7 etcd 3.2.1
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://access.redhat.com/errata/RHSA-2017:3188