Openshift: Task Create OpenShift router fails with exceptions when choosing Infra node for Openshift-router

Bug #1793030 reported by Sarath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Invalid
Critical
Pragash Vijayaragavan
Trunk
Invalid
Critical
Pragash Vijayaragavan

Bug Description

Version : Contrail rhel-queens-5.0-250 . && . Openshift 3.9 version

When Openshift router is requested through Inventory file to be scheduled on Infra node which is also recommendations from Redhat and the task fails as below during Provisioning Openshift/Contrail

TASK [openshift_hosted : Create OpenShift router] ***************************************************************************************************************************************************************
Monday 17 September 2018 18:18:36 -0400 (0:00:00.812) 0:11:04.292 ******
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: __main__.RouterException: Could not perform router preparation: F0917 18:18:38.562086 13904 router.go:569] unknown label spec: {'region': 'infra'}
failed: [10.0.0.6] (item={u'name': u'router', u'certificate': {u'keyfile': u'/etc/origin/master/openshift-router.key', u'certfile': u'/etc/origin/master/openshift-router.crt', u'cafile': u'/etc/origin/master/ca.crt'}, u'replicas': u'1', u'serviceaccount': u'router', u'namespace': u'default', u'selector': {'region': u'infra'}, u'edits': [{u'action': u'put', u'key': u'spec.strategy.rollingParams.intervalSeconds', u'value': 1}, {u'action': u'put', u'key': u'spec.strategy.rollingParams.updatePeriodSeconds', u'value': 1}, {u'action': u'put', u'key': u'spec.strategy.activeDeadlineSeconds', u'value': 21600}], u'images': u'openshift3/ose-${component}:${version}', u'stats_port': 1936, u'ports': [u'80:80', u'443:443']}) => {"changed": false, "item": {"certificate": {"cafile": "/etc/origin/master/ca.crt", "certfile": "/etc/origin/master/openshift-router.crt", "keyfile": "/etc/origin/master/openshift-router.key"}, "edits": [{"action": "put", "key": "spec.strategy.rollingParams.intervalSeconds", "value": 1}, {"action": "put", "key": "spec.strategy.rollingParams.updatePeriodSeconds", "value": 1}, {"action": "put", "key": "spec.strategy.activeDeadlineSeconds", "value": 21600}], "images": "openshift3/ose-${component}:${version}", "name": "router", "namespace": "default", "ports": ["80:80", "443:443"], "replicas": "1", "selector": {"region": "infra"}, "serviceaccount": "router", "stats_port": 1936}, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_xYYPYr/ansible_module_oc_adm_router.py\", line 3247, in <module>\n main()\n File \"/tmp/ansible_xYYPYr/ansible_module_oc_adm_router.py\", line 3238, in main\n results = Router.run_ansible(module.params, module.check_mode)\n File \"/tmp/ansible_xYYPYr/ansible_module_oc_adm_router.py\", line 3155, in run_ansible\n api_rval = ocrouter.create()\n File \"/tmp/ansible_xYYPYr/ansible_module_oc_adm_router.py\", line 2957, in create\n self.needs_update()\n File \"/tmp/ansible_xYYPYr/ansible_module_oc_adm_router.py\", line 3002, in needs_update\n not Utils.check_def_equal(self.prepared_router['ServiceAccount']['obj'].yaml_dict,\n File \"/tmp/ansible_xYYPYr/ansible_module_oc_adm_router.py\", line 2730, in prepared_router\n raise RouterException('Could not perform router preparation: %s' % results['stderr'])\n__main__.RouterException: Could not perform router preparation: F0917 18:18:38.562086 13904 router.go:569] unknown label spec: {'region': 'infra'}\n\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}

PLAY RECAP ******************************************************************************************************************************************************************************************************
10.0.0.4 : ok=136 changed=19 unreachable=0 failed=0
10.0.0.5 : ok=137 changed=19 unreachable=0 failed=0
10.0.0.6 : ok=448 changed=76 unreachable=0 failed=1
localhost : ok=12 changed=0 unreachable=0 failed=0

Sarath (nsarath)
tags: added: sanityblocker
Revision history for this message
Pragash Vijayaragavan (pvijayaragav) wrote :

Please use the below
openshift_hosted_manage_registry=true
openshift_hosted_registry_selector="region=infra"
openshift_hosted_manage_router=true
openshift_hosted_router_selector="region=infra"

this is not nodeselector, so if you provide a dict it shows error, you should provide a string.
Closing this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.