How to specify multiple labels with openshift_hosted_router_selector variable

Solution Verified - Updated -

Issue

  • How to specify multiple labels with openshift_hosted_router_selector variable
  • Openshift 3.10 installation fails with:
  1. Hosts:    host.example.com
     Play:     Create Hosted Resources - router
     Task:     Retrieve list of openshift nodes matching router selector     Message:  {u'cmd': u"/bin/oc get node --selector=['node-role.kubernetes.io/infra=true', 'router=default'] -o json -n default", u'returncode': 1, u'results': [{u'items': [], u'kind': u'List', u'apiVersion': u'v1', u'metadata': {u'selfLink': u'', u'resourceVersion': u''}}], u'stderr': u'Error from server (BadRequest): Unable to find "nodes" that match label selector "[\'node-role.kubernetes.io/infra=true\', \'router=default\']", field selector "": unable to parse requirement: invalid label key "[\'node-role.kubernetes.io/infra": prefix part a DNS-1123 subdomain must consist of lower case alphanumeric characters, \'-\' or \'.\', and must start and end with an alphanumeric character (e.g. \'example.com\', regex used for validation is \'[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\')\n', u'stdout': u'{\n    "apiVersion": "v1",\n    "items": [],\n    "kind": "List",\n    "metadata": {\n        "resourceVersion": "",\n        "selfLink": ""\n    }\n}\n'}

Environment

  • Openshift 3.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.