Bug 1466239 - Restart master service could not fix the invalid hostip in hostsubnet
Restart master service could not fix the invalid hostip in hostsubnet
Status: VERIFIED
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking (Show other bugs)
3.6.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.7.0
Assigned To: Dan Winship
Meng Bo
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-29 06:20 EDT by Yan Du
Modified: 2017-10-05 13:47 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
masterlog (3.60 KB, text/plain)
2017-06-29 06:20 EDT, Yan Du
no flags Details

  None (edit)
Description Yan Du 2017-06-29 06:20:11 EDT
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
Comment 1 Yan Du 2017-06-29 06:20 EDT
Created attachment 1292838 [details]
masterlog
Comment 2 Dan Winship 2017-06-29 11:43:57 EDT
(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?
Comment 3 Dan Winship 2017-06-29 12:31:53 EDT
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.
Comment 5 Ben Bennett 2017-06-30 10:06:03 EDT
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
Comment 6 Dan Winship 2017-06-30 10:37:51 EDT
(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.
Comment 7 Dan Winship 2017-06-30 10:50:49 EDT
Easy fix. https://github.com/openshift/origin/pull/14979
Comment 8 Yan Du 2017-07-05 02:00:37 EDT
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

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