Verify contrail-vrouter-agent

Verify contrail-vrouter-agent

While troubleshooting OpenContrail, you may have issues with the contrail-vrouter-agent configuration that fails to be created.

To verify the contrail-vrouter-agent configuration:

  1. Log in to any OpenStack compute node.

  2. Verify whether the global vRouter configuration is created:

    contrail-status
    

    Example of system response:

     == Contrail vRouter ==
     supervisor-vrouter:           active
     contrail-vrouter-agent        initializing (No Configuration for self)
     contrail-vrouter-nodemgr      active
    

    If the status is active, the configuration is created successfully. If the contrail-vrouter-agent status is initializing (No Configuration for self), proceed to the next step.

  3. Use either the OpenContrail web UI or SaltStack commands to create the global vRouter configuration:

    • Using the OpenContrail web UI:

      1. Log in to the OpenContrail web UI as admin.

      2. Go to Configure > Infrastructure > Global Config.

      3. On the right side above the table, click Edit. If the global configuration is missing, the window with default values opens.

      4. Click Save.

    • Using SaltStack:

      1. Log in to the Salt Master node.

      2. Depending on your deployment, apply one of the following states:

        • For Kubernetes:

          salt 'ctl01*' state.sls opencontrail.client
          
        • For OpenStack:

          salt 'ntw01*' state.sls opencontrail.client
          
      3. Verify if global-vrouter-config was created:

        • For Kubernetes:

          salt 'ctl01*' contrail.global_vrouter_config_list
          
        • For OpenStack:

          salt 'ntw01*' contrail.global_vrouter_config_list
          

        Note

        If the output is empty, add system.opencontrail.client.resource.global_vrouter_config as the last system class in /srv/salt/reclass/classes/cluster/k8s-ha-contrail-40/opencontrail/control.yml and reapply the opencontrail.client state for Kubernetes or OpenStack as described in the step 2.

      4. Verify the contrail-vrouter-agent status:

        salt 'cmp*' cmd.run "contrail-status"
        
      5. If global-vrouter-config is still missing, perform the following manual steps:

        1. Log in to any OpenContrail controller node, for example, ntw01.

        2. Run the following command:

          salt-call contrail.global_vrouter_config_create name="global-vrouter-config" \
          parent_type="global-system-config" encap_priority="MPLSoUDP,MPLSoGRE" \
          vxlan_vn_id_mode="automatic" \
          fq_names=['default-global-system-config','default-global-vrouter-config']
          
  4. Verify that the global vRouter configuration is created successfully and is in the active status using the contrail-status command.