cns-deploy retrieves wrong minor version if hostname includes "oc"

Solution Verified - Updated -

Issue

  • cns-deploy fails with below error is hostname containoc:
Using OpenShift CLI. 
/usr/bin/cns-deploy: line 414: [[: 5
ov: syntax error in expression (error token is "ov")
</snip>

due to line 414 in /usr/bin/cns-deploy:
oc_minor_version=$(${CLI} version | grep oc | awk '{ print $2 }' | cut -d '.' -f2)

Environment

  • Openshift Container Platform
  • cns-deploy-3.4

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.