Originally posted by **centminmod** June 3, 2024
I am testing tests with Ansible 2.14 and Glusterv11.1 for AlmaLinux 9 Extra's repo's CentOS SIG Storage GlusterFSv11 YUM repo and need clarification of the steps outlined at https://docs.gluster.org/en/main/Administrator-Guide/Geo-Replication/#creating-secret-pem-pub-file
When i run the command
```
gluster-georep-sshkey generate
```
it creates the file at `/var/lib/glusterd/geo-replication/common_secret.pem.pub`
> strace gluster-georep-sshkey generate 2>&1 | grep '.pub'
openat(AT_FDCWD, "/var/lib/glusterd/geo-replication/common_secret.pem.pub", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3
But from https://docs.gluster.org/en/main/Administrator-Guide/Geo-Replication/#post-creation-steps when I run command it complains about not finding `/home/geoaccount/common_secret.pem.pub`
```
/usr/libexec/glusterfs/set_geo_rep_pem_keys.sh geoaccount \
gvol-primary gvol-secondary
```
it complains
> "/usr/libexec/glusterfs/set_geo_rep_pem_keys.sh geoaccount datavol datavol", "delta": "0:00:01.116258", "end": "2024-06-02 21:40:06.317151", "msg": "non-zero return code", "rc": 1, "start": "2024-06-02 21:40:05.200893", "stderr": "", "stderr_lines": [], "stdout": "/home/geoaccount/common_secret.pem.pub not present.
running `set_geo_rep_pem_keys.sh` is expecting the file to be at `/home/geoaccount/common_secret.pem.pub`
```
[root@almalinux9vm1 ~]# /usr/libexec/glusterfs/set_geo_rep_pem_keys.sh geoaccount datavol datavol
/home/geoaccount/common_secret.pem.pub not present. Please run geo-replication command on primary with push-pem option to generate the file
```
and it does exist
```
[root@almalinux9vm1 ~]# ls -lah /home/geoaccount/common_secret.pem.pub
-rw-r--r-- 1 geoaccount geoaccount 3.6K Jun 2 23:45 /home/geoaccount/common_secret.pem.pub
```
but the script is actually looking for a different named file assigned to variable `COMMON_SECRET_PEM_PUB=datavol_datavol_common_secret.pem.pub`
```
bash -x /usr/libexec/glusterfs/set_geo_rep_pem_keys.sh geoaccount datavol datavol
+ main geoaccount datavol datavol
+ user=geoaccount
+ primary_vol=datavol
+ secondary_vol=datavol
++ gluster system:: getwd
+ GLUSTERD_WORKDIR=/var/lib/glusterd
+ '[' geoaccount == '' ']'
+ '[' datavol == '' ']'
+ '[' datavol == '' ']'
+ COMMON_SECRET_PEM_PUB=datavol_datavol_common_secret.pem.pub
+ '[' geoaccount == root ']'
++ getent passwd geoaccount
++ cut -d : -f 6
+ home_dir=/home/geoaccount
+ '[' /home/geoaccount == '' ']'
+ '[' -f /home/geoaccount/datavol_datavol_common_secret.pem.pub ']'
+ echo '/home/geoaccount/common_secret.pem.pub not present. Please run geo-replication command on primary with push-pem option to generate the file'
/home/geoaccount/common_secret.pem.pub not present. Please run geo-replication command on primary with push-pem option to generate the file
+ exit 1
```
Please share the node details and the command details that are used in each node. gluster-georep-sshkey generate and georep create push-pem commands to be run in Primary node and Post creation steps to be run in one of the secondary node.
Discussed in https://github.com/gluster/glusterfs/discussions/4373
Please share the node details and the command details that are used in each node.
gluster-georep-sshkey generate
and georep create push-pem commands to be run in Primary node and Post creation steps to be run in one of the secondary node.