How to Perform an Include/Exclude Operation on a Cluster and a Host at the same time for an SE group
Background
The include/exclude option for a host or a cluster is available on the Avi user interface (UI) for a Service Engine (SE) group. To edit an SE group, navigate to Infrastructure>Service Engine Groups. Click on the pencil icon at the top right side of the Avi UI, select Advanced and click Cluster or Host under Host Scope Service Engine within as shown in the below screenshots.
Limitation: Currently, we can either include/exclude a cluster or include/exclude a host at the same time for any SE group from the Avi UI. This means that the include/exclude operation can be done either on a cluster or a host, not on the both from the Avi UI. The Avi command line interface (CLI) can be used to perform include this operation on the cluster and the host at the same time for an SE group.
Instructions
Configuration from Avi CLI
In the below example, we are performing changes for the Service Engine group Default-Group.
The configure serviceenginegroup
command is used to change the association of a cluster or a host with an SE group for a vCenter cloud.
[admin]: > configure serviceenginegroup Default-Group
Multiple objects found for this query.
[0]: serviceenginegroup-7aa0dd01-1c56-4310-a169-019e6105698e#Default-Group in tenant admin, Cloud vCenter-Cloud
[1]: serviceenginegroup-c1a4cf82-a783-4f24-916c-0f7e95fe0287#Default-Group in tenant admin, Cloud Default-Cloud
[2]: serviceenginegroup-765e68fa-e93e-45a1-b0a2-5667ffdc9653#Default-Group in tenant admin, Cloud Openstack
Select one: 0
Updating an existing object. Currently, the object is:
----------------------------------------------------------------------------------------------+
Field Value
----------------------------------------------------------------------------------------------+
uuid serviceenginegroup-7aa0dd01-1c56-4310-a169-019e6105698e
name Default-Group
max_vs_per_se 10
min_scaleout_per_vs 1
max_scaleout_per_vs 4
max_se 10
vcpus_per_se 2
memory_per_se 2048
disk_per_se 10 gb
max_cpu_usage 80 gb
min_cpu_usage 30
se_deprovision_delay 60 min
auto_rebalance False
se_name_prefix Avi
vs_host_redundancy True
vcenter_folder test
vcenter_datastores_include False
vcenter_datastore_mode VCENTER_DATASTORE_ANY
vcenter_hosts
host_refs[1] 10.10.16.100
include True
cpu_reserve False
mem_reserve True
mgmt_network_ref Mgmt_N3k
ha_mode HA_MODE_SHARED
algo PLACEMENT_ALGO_PACKED
buffer_se 1
active_standby False
placement_mode PLACEMENT_MODE_AUTO
[admin]: serviceenginegroup> vcenter_clusters
[admin]: serviceenginegroup:vcenter_clusters>
cancel Exit the current submode without saving
cluster_refs Help string not found for argument
do Execute a show command
include Help string not found for argument
no Remove field
save Save and exit the current submode
show_schema show object schema
watch Watch a given show command
where Display the in-progress object
[admin]: serviceenginegroup:vcenter_clusters> include cluster_refs
Arista N3K SSD-build-servers
[admin]: serviceenginegroup:vcenter_clusters> include cluster_refs N3K
[admin]: serviceenginegroup:vcenter_clusters> save
[admin]: serviceenginegroup> vcenter_hosts
[admin]: serviceenginegroup:vcenter_hosts>
cancel Exit the current submode without saving
do Execute a show command
host_refs Help string not found for argument
include Help string not found for argument
no Remove field
save Save and exit the current submode
show_schema show object schema
watch Watch a given show command
where Display the in-progress object
[admin]: serviceenginegroup:vcenter_hosts> include host_refs
10.10.16.1 10.10.16.109 10.10.16.12 10.10.16.18 10.10.16.3 10.10.16.72 10.10.16.79 10.10.16.9 10.10.16.98 esx-64.avi.local
10.10.16.100 10.10.16.11 10.10.16.13 10.10.16.19 10.10.16.4 10.10.16.73 10.10.16.8 10.10.16.90 10.10.16.99 esx-65.avi.local
10.10.16.101 10.10.16.110 10.10.16.14 10.10.16.2 10.10.16.5 10.10.16.75 10.10.16.80 10.10.16.91 esx-57.avi.local esx-66.avi.local
10.10.16.102 10.10.16.111 10.10.16.15 10.10.16.20 10.10.16.6 10.10.16.76 10.10.16.81 10.10.16.93 esx-59.avi.local esx-67.avi.local
10.10.16.103 10.10.16.112 10.10.16.16 10.10.16.21 10.10.16.69 10.10.16.77 10.10.16.83 10.10.16.95 esx-61.avi.local esx-68.avi.local
10.10.16.104 10.10.16.113 10.10.16.17 10.10.16.22 10.10.16.70 10.10.16.78 10.10.16.84 10.10.16.97 esx-63.avi.local
[admin]: serviceenginegroup:vcenter_hosts> include host_refs 10.10.16.18
[admin]: serviceenginegroup:vcenter_hosts> save
[admin]: serviceenginegroup> save
----------------------------------------------------------------------------------------------+
Field Value
----------------------------------------------------------------------------------------------+
uuid serviceenginegroup-7aa0dd01-1c56-4310-a169-019e6105698e
name Default-Group
max_vs_per_se 10
min_scaleout_per_vs 1
max_scaleout_per_vs 4
max_se 10
vcpus_per_se 2
memory_per_se 2048
disk_per_se 10 gb
max_cpu_usage 80 gb
min_cpu_usage 30
se_deprovision_delay 60 min
auto_rebalance False
se_name_prefix Avi
vs_host_redundancy True
vcenter_folder test
vcenter_datastores_include False
vcenter_datastore_mode VCENTER_DATASTORE_ANY
vcenter_clusters
**cluster_refs[1] N3K**
include True
vcenter_hosts
**host_refs[1] 10.10.16.100**
**host_refs[2] 10.10.16.18**
include True
cpu_reserve False
mem_reserve True
mgmt_network_ref Mgmt_N3k
ha_mode HA_MODE_SHARED
algo PLACEMENT_ALGO_PACKED
buffer_se 1
active_standby False
placement_mode PLACEMENT_MODE_AUTO
Conclusion
The cluster name included for the SE group: N3K The hosts included for the SE group: 10.10.16.100 and 10.10.16.18 Refer the below screenshot to check the changes in the membership of the cloud.