Comments (6)
Hi, the error doesn't appear to be one with idempotency but that the initiator is already in a host. Have you verified that the initiator is not part of a host with a different name.?
from ansible-powermax.
I'm able to reproduce this issue easily but it's not an idempotency issue, the error is due to initiator being in another host. See images.
from ansible-powermax.
Hi @remkolodder, can you confirm that this was your issue and close the issue?
from ansible-powermax.
Hi Paul,
I will be checking this today. Cannot confirm this yet.
from ansible-powermax.
Hi Paul,
We figured out the issues, we are re-using existing machines with a different name in the current powermax setup. they are prefixed with a prefix, and when redeploying such a machine we expected the hosts part to rename the host(s).
That doesn't happen so we work around it by sniffing the log message, if the machine is already there, we do a different task and rename it.
That looks like this:
- name: "Create PowerMax host"
when: (host.split('.')[0]) not in powermax_host_facts.Hosts
dellemc.powermax.dellemc_powermax_host:
unispherehost: "{{ host }}"
universion: "{{ version }}"
verifycert: "{{ verifycert }}"
serial_no: "{{ serial }}"
user: "{{ username }}"
password: "{{ password }}"
host_name: "{{ host.split('.')[0] }}"
host_type: "default"
state: "present"
initiator_state: "present-in-host"
initiators: "{{ initiators }}"
register: host_add
failed_when: >
(host_add.msg is defined) and
'is already part of a host' not in host_add.msg
- name: Rename host
when: >
(host_add.msg is defined) and
'is already part of a host' in host_add.msg
dellemc.powermax.dellemc_powermax_host:
unispherehost: "{{ host }}"
universion: "{{ version }}"
verifycert: "{{ verifycert }}"
serial_no: "{{ serial }}"
user: "{{ username }}"
password: "{{ password }}"
host_name: "ig_{{ (host.split('.')[0] | replace('-', '_')) }}"
new_name: "{{ host.split('.')[0] }}"
state: "present"
Thanks for your efforts, it would be great when we can auto rename something but we can work around it like this as well :)
from ansible-powermax.
from ansible-powermax.
Related Issues (12)
- [FEATURE]: Ability to force move devices between storage groups if SRDF Protected HOT 1
- [FEATURE]: would like to be able to get masking view connection information from info module HOT 1
- [FEATURE]: Add support for getting volume pair information for a SRDF group HOT 1
- [BUG]: ansible-builder introspect fails with file not found HOT 2
- [FEATURE]: dellemc.powermax.storagegroup - Make vol_name an optional argument HOT 5
- [BUG]: meta/runtime.yml contains redirects that will stop working with ansible-core 2.14 HOT 1
- [BUG]: Host WWNs not idempotent if input in different case HOT 3
- [BUG]: Info Module is looping on all masking views to filter for lun addresses HOT 1
- [BUG]:fatal: [localhost]: FAILED! => {"changed": false, "msg": "Delete storage group X999RSWP_12312423_tmp99CRTEST_RSWP failed with error get_storage_group_snapshot_generation_list() got an unexpected keyword argument 'storagegroup_id' "} HOT 1
- [FEATURE]: Add volume_identifier to info module 'vol' subset
- [FEATURE]: Add Unisphere port parameter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-powermax.