Virtual host missing environment group

You're viewing Apigee and Apigee hybrid documentation.
There is no equivalent Apigee Edge documentation for this topic.

Symptom

An ApigeeIssue with Reason AIS_VIRTUALHOST_MISSING_ENVGROUP is shown when viewing resources in the apigee namespace.

Error messages

After running kubectl -n apigee get apigeeissues , the following error is displayed:

NAME                     SEVERITY   REASON                             DOCUMENTATION                                                                                  AGE
vhost-missing-eg-my-eg   ERROR      AIS_VIRTUALHOST_MISSING_ENVGROUP   https://cloud.google.com/apigee/docs/api-platform/troubleshoot/playbooks/vh-missing-env-group   5h18m

Cause: Virtualhost missing environment group

One of the virtualhosts defined in overrides.yaml is missing its corresponding EnvironmentGroup .

Diagnosis

Run the following command:

kubectl -n apigee describe apigeeissue ISSUE_NAME 

Where ISSUE_NAME is the name of the issue. For example, vhost-missing-eg-my-eg .

Something similar to the following is returned:

 Name 
 : 
  
 vhost 
 - 
 missing 
 - 
 eg 
 - 
 my 
 - 
 eg 
 Namespace 
 : 
  
 apigee 
 Labels 
 : 
  
 ais 
 - 
 reason 
 = 
 AIS_VIRTUALHOST_MISSING_ENVGROUP 
 Annotations 
 : 
  
< none 
 > 
 API 
  
 Version 
 : 
  
 apigee 
 . 
 cloud 
 . 
 google 
 . 
 com 
 / 
 v1alpha1 
 Kind 
 : 
  
 ApigeeIssue 
 Metadata 
 : 
  
 Creation 
  
 Timestamp 
 : 
  
 2023 
 - 
 04 
 - 
 05 
 T14 
 : 
 29 
 : 
 38 
 Z 
  
 Generation 
 : 
  
 1 
  
 Managed 
  
 Fields 
 : 
  
 API 
  
 Version 
 : 
  
 apigee 
 . 
 cloud 
 . 
 google 
 . 
 com 
 / 
 v1alpha1 
  
 Fields 
  
 Type 
 : 
  
 FieldsV1 
  
 fieldsV1 
 : 
  
 f 
 : 
 spec 
 : 
  
 .: 
  
 f 
 : 
 details 
 : 
  
 f 
 : 
 documentation 
 : 
  
 f 
 : 
 reason 
 : 
  
 f 
 : 
 severity 
 : 
  
 Manager 
 : 
  
 apigeewatcher 
  
 Operation 
 : 
  
 Update 
  
 Time 
 : 
  
 2023 
 - 
 04 
 - 
 05 
 T14 
 : 
 29 
 : 
 38 
 Z 
  
 Resource 
  
 Version 
 : 
  
 28195 
  
 UID 
 : 
  
 f7b62eb3 
 - 
 3f84 
 - 
 4 
 a37 
 - 
 9 
 ba8 
 - 
 9 
 a0e1e9c3454 
 Spec 
 : 
  
 Details 
 : 
  
 Expected 
  
 EnvironmentGroup 
  
 "my-eg" 
  
 in 
  
 ApigeeOrganization 
  
 "my-org" 
  
 for 
  
 ApigeeRouteConfig 
  
 "my-org-my-eg" 
  
 Documentation 
 : 
  
 https 
 : 
 // 
 cloud 
 . 
 google 
 . 
 com 
 / 
 apigee 
 / 
 docs 
 / 
 api 
 - 
 platform 
 / 
 troubleshoot 
 / 
 playbooks 
 / 
 vh 
 - 
 missing 
 - 
 env 
 - 
 group 
  
 Reason 
 : 
  
 AIS_VIRTUALHOST_MISSING_ENVGROUP 
  
 Severit<y 
 : 
  
 ERROR 
 Events 
 : 
  
 none 
 > 
 Spec 
 : 
  
 Details 
 : 
  
 Expected 
  
 EnvironmentGroup 
  
 "my-eg" 
  
 in 
  
 ApigeeOrganization 
  
 "my-org" 
  
 for 
  
 ApigeeRouteConfig 
  
 "my-org-my-eg" 

The contents of Spec.Details explains the name of the EnvironmentGroup that is expected to exist.

Resolution

  1. Use the describe ApigeeIssue command to display the name of the EnvironmentGroup which is expected to exist:
    kubectl -n apigee describe apigeeissues ISSUE_NAME 
    

    Where ISSUE_NAME is the name of the issue. For example, vhost-missing-eg-my-eg .

    In this example, the environment group my-eg is expected in the my-org Apigee organization.

  2. Use one of the following methods to correct the problem:
    1. Create the environment group:
      1. Create an environment group .
      2. Add an environment .
      3. Create a proxy .
      4. Deploy a proxy to that environment.
    2. Delete the environment group:
      1. Open overrides.yaml in a text editor.
      2. Delete the removed environment group from the virtualhosts .
      3. Save the overrides.yaml file.
      4. Reapply the overrides.yaml file using the Helm command :

        Dry run:

        helm upgrade ENV_GROUP_RELEASE_NAME 
        apigee-virtualhost/ \
          --namespace APIGEE_NAMESPACE 
        \
          --atomic \
          --set envgroup= ENV_GROUP 
        \
          -f overrides 
        .yaml \
          --dry-run=server

        Make sure to include all of the settings shown, including --atomic so that the action rolls back on failure.

        Your installation may or may not have been set up using an ENV_GROUP_RELEASE_NAME that differs from ENV_GROUP . For information on the settings, see Install Apigee hybrid using Helm .

        Install the chart:

        helm upgrade ENV_GROUP_RELEASE_NAME 
        apigee-virtualhost/ \
          --namespace APIGEE_NAMESPACE 
        \
          --atomic \
          --set envgroup= ENV_GROUP 
        \
          -f overrides 
        .yaml

        Retry and verify that the error message is no longer returned.

Must gather diagnostic information

If the problem persists even after following the above instructions, gather the following diagnostic information and then contact Google Cloud Customer Care :

  1. The Google Cloud Project ID.
  2. The name of the Apigee hybrid organization.
  3. The Spec.Details field of the ApigeeIssue .
Design a Mobile Site
View Site in Mobile | Classic
Share by: