Enable contrail-tools

The contrail-tools container provides a centralized location for all available Tungsten Fabric tools and CLI commands. The container includes such utilities as vif, flow, nh, and other tools to debug network issues. MOSK deploys contrail-tools using the Tungsten Fabric Operator through the TFOperator custom resource.

To enable the Tungsten Fabric contrail-tools Deployment:

  1. Enable the tools Deployment in the TFOperator resource for the operator to start the Pods with utilities to debug Tungsten Fabric on nodes with the tfvrouter:enabled label:

    spec:
      features:
        tfTools:
          tfToolsEnabled: true
          labels:
            tfvrouter: enabled
    
    spec:
      controllers:
        tf-tool:
          tools:
            enabled: true
            labels:
              tfvrouter: enabled
    

    Note

    Use the labels section to specify target nodes for the contrail-tools Deployment. If the labels section is not specified, the tf-tool-ctools-<xxxxx> Pods will be scheduled to all available nodes in current Deployment.

  2. Wait until the tf-tool-ctools-<xxxxx> Pods are ready in the tf namespace.

    Note

    The <xxxxx> string in a Pod name consists of random alpha-numeric symbols generated by Kubernetes to differentiate the tf-tool-ctools Pods.

  3. Use interactive shell in the tf-tool-ctools-<xxxxx> Pod to debug current Deployment or run commands through kubectl, for example:

    kubectl -n tf exec tf-tool-ctools-<xxxxx> -- vif --list
    
  4. Disable the tools Deployment:

    kubectl -n tf patch tfoperator.tf.mirantis.com <TFOperator CR name> --type='json' -p='[{"op": "replace", "path": "/spec/features/tfTools/tfToolsEnabled", "value": false}]'
    
    kubectl -n tf patch tfoperator.operator.tf.mirantis.com <TFOperator CR name> --type='json' -p='[{"op": "replace", "path": "/spec/controllers/tf-tool/tools/enabled", "value": false}]'