#Hello can we get a ` local name` option
1 messages · Page 1 of 1 (latest)
on these same lines, I need a -local-name option in na_ontap_vserver_peer , specifically for the peer-options dict . Right now you cannot peer two vservers with the same name. You can specify the local-name option in the source cluster, but on the destination it'll generate an error about duplicate names and not actually finish creating the peer.
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error accepting vserver peer relationship on fsx: calling: svm/peers/73ae69ca-5613-11ed-9319-4d41ebb1de0c: got {'message': 'System generated a name for the peer SVM because of a naming conflict. Use the \"name\" property to uniquely identify the peer SVM alias name.', 'code': '9896088'}."}
I'm trying to peer lots of FSx Ontap clusters, all with names like "FsxId0123456789ab0". I want to peer them with a human-readable name that I can define. I then want to peer vservers on both clusters (all clusters by default have a vserver called fsx) but use that same human-readable name to describe them. I'm automating everything, so having a standard vserver name like fsx is easier than having a unique vserver name on every cluster
But sadly the cluster_peer and vserver_peer modules don't seem to accommodate my (perhaps unusual) environment. Peering these clusters manually is super easy, because I just use the -local-name option with both my vserver peer create and vserver peer accept commands
With na_ontap_vserver_peer, we have
local_name_for_peer:
description:
- Specifies local name of the peer Vserver in the relationship.
- Use this if you see "Error creating vserver peer ... Vserver name conflicts with one of the following".
type: str
local_name_for_source:
description:
- Specifies local name of the source Vserver in the relationship.
- Use this if you see "Error accepting vserver peer ... System generated a name for the peer Vserver because of a naming conflict".
type: str
Is this what you are looking for?
oh, that's exactly what I needed! I didn't see that option 🙂
Great! Back to na_ontap_cluster_peer, what would local-name be used for?
I want to do the same thing basically, give a human-readable name for my cluster peer so I can distinguish which Fsx instance is peered with my source cluster. I have a cluster on-prem which is used to flexcache some common data to a bunch of Fsx instances in AWS. Right now my cluster peer show looks like this FsxId00ff6f4d8f24 1-80-000011 Available ok FsxId020b7ebe75771 1-80-000011 Available ok FsxId05b8f76f4c880 1-80-000011 Available ok FsxId05a1751b1598a 1-80-000011 Available ok FsxId0901176390b9c 1-80-000011 Available ok FsxId0fd6ab02cd0e5 1-80-000011 Available ok and I'd prefer if I could use the -local-name option to assign a descriptor instead
I was looking for local_host in the REST API, but could not find it. Though the API shows a name option that we don't currently support. Would that help? I'm not too sure how name and local_host are related.