New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: Replace host for same fqdn #108
Conversation
@@ -0,0 +1,10 @@ | |||
cluster_node: | |||
hosts: | |||
# mention whatever host is provided in gluster_maintenance_cluster_node or in gluster_maintenance_cluster_node_2 either one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve the comment section. What should be the hostname that should here should be clear. There shouldn't be ambiguity. Something like : "this is the backend network FQDN of one of the active hosts. It can take a value of the hosts in gluster_maintenance_cluster_node
- This can be better named as
gluster_maintenance_old_node: <host1-backend-network-FQDN> | ||
gluster_maintenance_new_node: <host1-backend-network-FQDN> | ||
gluster_maintenance_cluster_node: <host2-backend-network-FQDN> | ||
gluster_maintenance_cluster_node_2: <host3-backend-network-FQDN> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better names should be good:
gluster_maintenance_old_node:
gluster_maintenance_new_node:
gluster_maintenance_cluster_node:
gluster_maintenance_cluster_node_2:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have few comments to improve the comments in the inventory files to replace the host
@gobindadas Please add clean and easily understandable comments in the node_replace_inventory.yml file. |
@@ -0,0 +1,10 @@ | |||
cluster_node: | |||
hosts: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just adding a comment for cli users:-
make sure whatever host you are providing here is where the playbook should be executed.
lvsize: 200G | ||
|
||
# Common configurations | ||
vars: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part needs to be properly intended, since hc nodes in the top is being implemented as a class type and we are only parsing a single class, and this is not properly intended, its taking 'vars' as another hostname
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is properly intended. I don't think "vars" will take as hosts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PLAY RECAP ***********************************************************************************************************************************************************************
nixcraft-praji1-rhel8.com : ok=9 changed=3 unreachable=0 failed=1 skipped=15 rescued=0 ignored=0
vars : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vars needs to be intended
lvsize: 200G | ||
|
||
# Common configurations | ||
vars: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PLAY RECAP ***********************************************************************************************************************************************************************
nixcraft-praji1-rhel8.com : ok=9 changed=3 unreachable=0 failed=1 skipped=15 rescued=0 ignored=0
vars : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
also just wanted to know, wouldn't it be better to include two inventory in the same file, |
gluster_maintenance_old_node: <gluster_maintenance_old_node> | ||
gluster_maintenance_new_node: <gluster_maintenance_new_node> | ||
gluster_maintenance_cluster_node: <gluster_maintenance_cluster_node> | ||
gluster_maintenance_cluster_node_2: <gluster_maintenance_cluster_node_2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still I feel we need to emphasize on backend network in the name. Something like previous sounds good. 'host-backend-network-FQDN'. That will add more clarity whether to add front-end or back-end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still feel the need for adding hostname along with backend-network-FQDN, and that would clarify the ambiguity
- block: | ||
- name: Gluster host preparation | ||
include_role: | ||
name: "{{ item }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I executed the playbook, I got this warning - "The loop variable 'item' is already in use." for each task execution. I have replaced it with separate loop_variable and that solved the problem. Please incorporate the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While executing the replace_host playbook, I was seeing this warning "The loop variable 'item' is already in use." for every task execution, I have supplemented 'with_items' with loop_control and loop_variable and that solved the problem
@gobindadas While executing the replace_host playbook, I was seeing this warning "The loop variable 'item' is already in use." for every task execution, I have supplemented 'with_items' with loop_control and loop_variable and that solved the problem
|
Apologies, It is properly intended, issue was with my setup |
Fixed all comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
RHBZ: 1832658