We recently had a user stumble over input data validation. In MetroAE v3, all input data in your deployments folder is schema validated. This means that every file in your deployment must conform to the schema. This includes required data.
In the case under discussion, a user sent us their ansible.log file. Upon inspection, we found the following near the end of the log:
"Invalid data in /root/nuage-metro/deployments/default/vstats.yml for Target Server type: '' is not one of ['kvm', 'vcenter', 'heat', 'aws']"
This means that there is invalid data in the vstats.yml file in the
default deployment. There’s a big hint as to the problem: `” is not one of…`. It looks like the Target Server Type is not specified. Checking the content of the vstats.yml file, we see this:
# VSTAT 1
##### Management Interface
# < Hostname >
# Management network host name for the VSTAT
# < Management IP address >
# Management network IP address for the VSTAT
# < Management Network Prefix Length >
# Management network prefix length for the VSTAT
# < Management Network Gateway >
# Management network gateway for the VSTAT
# < VM name >
# Name of the Virtual Machine on the Hypervisor
# vmname: (Hostname)
# < Upgrade VM name >
# Virtual Machine name of the new Stats VM. Used during Upgrade only
# upgrade_vmname: “”
##### Target Server
# < Target Server type >
# Type of hypervisor environment into which the instance will be created
# (kvm, vcenter, heat, aws)
# < Target Server IP or FQDN >
# Hostname or IP address of the hypervisor where VM will be instantiated. In the case of deployment in a vCenter environment, this will be the FQDN of the vCenter Server
The items I have highlighted in red are required. The items I have highlighted in blue are optional. Notice that the format of the yml file is that when you start with a blank form, required data is uncommented and optional data is commented.
You can see from this example that there is no data for VSTAT1. This suggests one of the following:
- The user did not mean to include VSTAT (Elasticsearch) in the deployment. If that is the case, in order to pass schema validation, this file must be deleted from the deployment directory.
- The user wants to include the VSTAT node in the deployment, but they need to fill out at least the required fields in order to make progress. If they want to deploy elasticsearch, they must provide the data highlighted in red.
Note that MetroAE comes with the default deployment as a starting place. It is best practice to create a copy of the default deployment folder and edit the files therein. MetroAE also comes with plenty of examples that you can use as starting places for your deployment, including a
blank example that includes all of the files we support.