file_sync_manager.py error
Pages: 1 2
f.cuseo
65 Posts
October 26, 2023, 4:43 pmQuote from f.cuseo on October 26, 2023, 4:43 pmHello.
I have a continous error with sync manager:
26/10/2023 18:40:36 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts
I have already restarted all "petasan-file-sync" services, but without any success.
Of course, is possible that I have write the wrong path, but now how can I delete from "queue" ?
Hello.
I have a continous error with sync manager:
26/10/2023 18:40:36 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts
I have already restarted all "petasan-file-sync" services, but without any success.
Of course, is possible that I have write the wrong path, but now how can I delete from "queue" ?
admin
2,918 Posts
October 27, 2023, 4:03 pmQuote from admin on October 27, 2023, 4:03 pmwhat is output of
ls -l /opt/petasan/config/etc/hosts
ls -l /etc/hosts
systemctl status petasan-file-sync
have you edited /etc//hosts yourself ?
what is output of
ls -l /opt/petasan/config/etc/hosts
ls -l /etc/hosts
systemctl status petasan-file-sync
have you edited /etc//hosts yourself ?
f.cuseo
65 Posts
October 30, 2023, 8:07 amQuote from f.cuseo on October 30, 2023, 8:07 amroot@petasan-08:~# ls -lat /etc/hosts
lrwxrwxrwx 1 root root 29 Oct 25 16:44 /etc/hosts -> /opt/petasan/config/etc/hosts
root@petasan-08:~# ls -lat /opt/petasan/config/etc/hosts
-rw-r--r-- 1 root root 282 Oct 30 09:04 /opt/petasan/config/etc/hosts
root@petasan-08:~# systemctl status petasan-file-sync
● petasan-file-sync.service - PetaSAN File Sync Service
Loaded: loaded (/lib/systemd/system/petasan-file-sync.service; static; vendor preset: enabled)
Active: active (running) since Thu 2023-10-26 18:15:52 CEST; 3 days ago
Main PID: 697159 (files_sync.py)
Tasks: 1 (limit: 77040)
Memory: 18.1M
CGroup: /system.slice/petasan-file-sync.service
└─697159 /usr/bin/python3 /opt/petasan/services/files_sync.py
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: /opt/petasan/config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: index 46251
Yes, previously (is wrong, i know), i have edited /etc/hosts before stopping file-sync process.
now all is ok, file /etc/hosts and /opt/petasan/etc/hosts are ok on all the nodes, but i continue to have this error on all hosts
root@petasan-08:~# ls -lat /etc/hosts
lrwxrwxrwx 1 root root 29 Oct 25 16:44 /etc/hosts -> /opt/petasan/config/etc/hosts
root@petasan-08:~# ls -lat /opt/petasan/config/etc/hosts
-rw-r--r-- 1 root root 282 Oct 30 09:04 /opt/petasan/config/etc/hosts
root@petasan-08:~# systemctl status petasan-file-sync
● petasan-file-sync.service - PetaSAN File Sync Service
Loaded: loaded (/lib/systemd/system/petasan-file-sync.service; static; vendor preset: enabled)
Active: active (running) since Thu 2023-10-26 18:15:52 CEST; 3 days ago
Main PID: 697159 (files_sync.py)
Tasks: 1 (limit: 77040)
Memory: 18.1M
CGroup: /system.slice/petasan-file-sync.service
└─697159 /usr/bin/python3 /opt/petasan/services/files_sync.py
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: /opt/petasan/config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: index 46251
Yes, previously (is wrong, i know), i have edited /etc/hosts before stopping file-sync process.
now all is ok, file /etc/hosts and /opt/petasan/etc/hosts are ok on all the nodes, but i continue to have this error on all hosts
admin
2,918 Posts
November 1, 2023, 4:24 pmQuote from admin on November 1, 2023, 4:24 pmon any host with a valid /etc/hosts file
run:
systemctl stop petasan-file-sync
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-sync
if you still see issues, stop sync service on all nodes
systemctl stop petasan-file-sync
on any host with a valid /etc/hosts file
run:
systemctl stop petasan-file-sync
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-sync
if you still see issues, stop sync service on all nodes
systemctl stop petasan-file-sync
f.cuseo
65 Posts
November 4, 2023, 5:56 pmQuote from f.cuseo on November 4, 2023, 5:56 pmI still have the problem. Petasan tries to sync /config/etc/hosts (that is not present on system).
There is a queue somewhere ?
04/11/2023 18:55:18 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
I still have the problem. Petasan tries to sync /config/etc/hosts (that is not present on system).
There is a queue somewhere ?
04/11/2023 18:55:18 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
f.cuseo
65 Posts
November 6, 2023, 2:27 pmQuote from f.cuseo on November 6, 2023, 2:27 pmThis is what happens on my nodes:
root@petasan-04:~# systemctl status petasan-sync-replication-node.service
● petasan-sync-replication-node.service - PetaSAN Sync Replication Node
Loaded: loaded (/lib/systemd/system/petasan-sync-replication-node.service; static; vendor preset: enabled)
Active: inactive (dead)
----
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: data [{'LockIndex': 0, 'Key': 'PetaSAN/Config/Files/etc/hosts', 'Flags': 0, 'Value': 'MTcyLjE2LjMzLjEzICAgcGV0YXNhbi0wMwoxMjcuMC4wLjEgICBsb2NhbGhvc3QKMTcyLjE2LjMz
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: -------------------------------------
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: updated current_index: 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/cluster_info.json
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
This is what happens on my nodes:
root@petasan-04:~# systemctl status petasan-sync-replication-node.service
● petasan-sync-replication-node.service - PetaSAN Sync Replication Node
Loaded: loaded (/lib/systemd/system/petasan-sync-replication-node.service; static; vendor preset: enabled)
Active: inactive (dead)
----
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: data [{'LockIndex': 0, 'Key': 'PetaSAN/Config/Files/etc/hosts', 'Flags': 0, 'Value': 'MTcyLjE2LjMzLjEzICAgcGV0YXNhbi0wMwoxMjcuMC4wLjEgICBsb2NhbGhvc3QKMTcyLjE2LjMz
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: -------------------------------------
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: updated current_index: 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/cluster_info.json
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
admin
2,918 Posts
November 6, 2023, 8:07 pmQuote from admin on November 6, 2023, 8:07 pmThere should be a file
/opt/petasan/config/etc/hosts
and a sym link /etc/hosts pointing to in
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hosts
if this was changed, then recreate the /opt/petasan/config/etc/hosts and create a symlink /etc/hosts point to it via ln -s
This should be done on all nodes. Then on a single node do:
systemctl stop petasan-file-syncano
nano /etc/hosts # make sure file is correct, edit if needed, all management ips of all nodes + localhost
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-sync
There should be a file
/opt/petasan/config/etc/hosts
and a sym link /etc/hosts pointing to in
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hosts
if this was changed, then recreate the /opt/petasan/config/etc/hosts and create a symlink /etc/hosts point to it via ln -s
This should be done on all nodes. Then on a single node do:
systemctl stop petasan-file-syncano
nano /etc/hosts # make sure file is correct, edit if needed, all management ips of all nodes + localhost
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-sync
Last edited on November 6, 2023, 8:08 pm by admin · #7
f.cuseo
65 Posts
November 7, 2023, 8:44 amQuote from f.cuseo on November 7, 2023, 8:44 amAll the nodes are already ok (symlinks and files are correct).
If I follow your instructions, stopping petasan-file-sync and issue /opt/petasan/scripts/util/sync_file.py /etc/hosts, this is what I have in /opt/petasan/log/PetaSAN.log:
07/11/2023 09:42:19 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
All the nodes are already ok (symlinks and files are correct).
If I follow your instructions, stopping petasan-file-sync and issue /opt/petasan/scripts/util/sync_file.py /etc/hosts, this is what I have in /opt/petasan/log/PetaSAN.log:
07/11/2023 09:42:19 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
Last edited on November 7, 2023, 8:52 am by f.cuseo · #8
f.cuseo
65 Posts
November 10, 2023, 2:50 pmQuote from f.cuseo on November 10, 2023, 2:50 pmHello.
There is a queue ? A db with the sync operation to do ? Because I still have this continuos error on all my nodes 🙁
Hello.
There is a queue ? A db with the sync operation to do ? Because I still have this continuos error on all my nodes 🙁
admin
2,918 Posts
November 13, 2023, 10:11 pmQuote from admin on November 13, 2023, 10:11 pmWith all nodes having /etc/hosts a link to /opt/petasan/config/etc/hosts, as in:
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hosts
Go to a hosts with valid content of /etc/hosts, then run
consul kv delete -recurse PetaSAN/Config/Files
consul kv get -recurse PetaSAN/Config/Files
/opt/petasan/scripts/util/sync_file.py /etc/hosts
consul kv get -recurse PetaSAN/Config/Files
With all nodes having /etc/hosts a link to /opt/petasan/config/etc/hosts, as in:
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hosts
Go to a hosts with valid content of /etc/hosts, then run
consul kv delete -recurse PetaSAN/Config/Files
consul kv get -recurse PetaSAN/Config/Files
/opt/petasan/scripts/util/sync_file.py /etc/hosts
consul kv get -recurse PetaSAN/Config/Files
Pages: 1 2
file_sync_manager.py error
f.cuseo
65 Posts
Quote from f.cuseo on October 26, 2023, 4:43 pmHello.
I have a continous error with sync manager:
26/10/2023 18:40:36 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hostsI have already restarted all "petasan-file-sync" services, but without any success.
Of course, is possible that I have write the wrong path, but now how can I delete from "queue" ?
Hello.
I have a continous error with sync manager:
26/10/2023 18:40:36 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts
I have already restarted all "petasan-file-sync" services, but without any success.
Of course, is possible that I have write the wrong path, but now how can I delete from "queue" ?
admin
2,918 Posts
Quote from admin on October 27, 2023, 4:03 pmwhat is output of
ls -l /opt/petasan/config/etc/hosts
ls -l /etc/hostssystemctl status petasan-file-sync
have you edited /etc//hosts yourself ?
what is output of
ls -l /opt/petasan/config/etc/hosts
ls -l /etc/hosts
systemctl status petasan-file-sync
have you edited /etc//hosts yourself ?
f.cuseo
65 Posts
Quote from f.cuseo on October 30, 2023, 8:07 amroot@petasan-08:~# ls -lat /etc/hosts
lrwxrwxrwx 1 root root 29 Oct 25 16:44 /etc/hosts -> /opt/petasan/config/etc/hosts
root@petasan-08:~# ls -lat /opt/petasan/config/etc/hosts
-rw-r--r-- 1 root root 282 Oct 30 09:04 /opt/petasan/config/etc/hosts
root@petasan-08:~# systemctl status petasan-file-sync
● petasan-file-sync.service - PetaSAN File Sync Service
Loaded: loaded (/lib/systemd/system/petasan-file-sync.service; static; vendor preset: enabled)
Active: active (running) since Thu 2023-10-26 18:15:52 CEST; 3 days ago
Main PID: 697159 (files_sync.py)
Tasks: 1 (limit: 77040)
Memory: 18.1M
CGroup: /system.slice/petasan-file-sync.service
└─697159 /usr/bin/python3 /opt/petasan/services/files_sync.pyOct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: /opt/petasan/config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: index 46251Yes, previously (is wrong, i know), i have edited /etc/hosts before stopping file-sync process.
now all is ok, file /etc/hosts and /opt/petasan/etc/hosts are ok on all the nodes, but i continue to have this error on all hosts
root@petasan-08:~# ls -lat /etc/hosts
lrwxrwxrwx 1 root root 29 Oct 25 16:44 /etc/hosts -> /opt/petasan/config/etc/hosts
root@petasan-08:~# ls -lat /opt/petasan/config/etc/hosts
-rw-r--r-- 1 root root 282 Oct 30 09:04 /opt/petasan/config/etc/hosts
root@petasan-08:~# systemctl status petasan-file-sync
● petasan-file-sync.service - PetaSAN File Sync Service
Loaded: loaded (/lib/systemd/system/petasan-file-sync.service; static; vendor preset: enabled)
Active: active (running) since Thu 2023-10-26 18:15:52 CEST; 3 days ago
Main PID: 697159 (files_sync.py)
Tasks: 1 (limit: 77040)
Memory: 18.1M
CGroup: /system.slice/petasan-file-sync.service
└─697159 /usr/bin/python3 /opt/petasan/services/files_sync.py
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: /opt/petasan/config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: file_path
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: config/etc/hosts
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: Gonna write file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: wrote file
Oct 30 09:04:40 petasan-08 files_sync.py[697159]: index 46251
Yes, previously (is wrong, i know), i have edited /etc/hosts before stopping file-sync process.
now all is ok, file /etc/hosts and /opt/petasan/etc/hosts are ok on all the nodes, but i continue to have this error on all hosts
admin
2,918 Posts
Quote from admin on November 1, 2023, 4:24 pmon any host with a valid /etc/hosts file
run:
systemctl stop petasan-file-sync
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-syncif you still see issues, stop sync service on all nodes
systemctl stop petasan-file-sync
on any host with a valid /etc/hosts file
run:
systemctl stop petasan-file-sync
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-sync
if you still see issues, stop sync service on all nodes
systemctl stop petasan-file-sync
f.cuseo
65 Posts
Quote from f.cuseo on November 4, 2023, 5:56 pmI still have the problem. Petasan tries to sync /config/etc/hosts (that is not present on system).
There is a queue somewhere ?
04/11/2023 18:55:18 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
I still have the problem. Petasan tries to sync /config/etc/hosts (that is not present on system).
There is a queue somewhere ?
04/11/2023 18:55:18 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
f.cuseo
65 Posts
Quote from f.cuseo on November 6, 2023, 2:27 pmThis is what happens on my nodes:
root@petasan-04:~# systemctl status petasan-sync-replication-node.service
● petasan-sync-replication-node.service - PetaSAN Sync Replication Node
Loaded: loaded (/lib/systemd/system/petasan-sync-replication-node.service; static; vendor preset: enabled)
Active: inactive (dead)
----Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: data [{'LockIndex': 0, 'Key': 'PetaSAN/Config/Files/etc/hosts', 'Flags': 0, 'Value': 'MTcyLjE2LjMzLjEzICAgcGV0YXNhbi0wMwoxMjcuMC4wLjEgICBsb2NhbGhvc3QKMTcyLjE2LjMz
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: -------------------------------------
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: updated current_index: 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/cluster_info.json
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
This is what happens on my nodes:
root@petasan-04:~# systemctl status petasan-sync-replication-node.service
● petasan-sync-replication-node.service - PetaSAN Sync Replication Node
Loaded: loaded (/lib/systemd/system/petasan-sync-replication-node.service; static; vendor preset: enabled)
Active: inactive (dead)
----
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: data [{'LockIndex': 0, 'Key': 'PetaSAN/Config/Files/etc/hosts', 'Flags': 0, 'Value': 'MTcyLjE2LjMzLjEzICAgcGV0YXNhbi0wMwoxMjcuMC4wLjEgICBsb2NhbGhvc3QKMTcyLjE2LjMz
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: -------------------------------------
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: updated current_index: 212050
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/cluster_info.json
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: /opt/petasan/config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: file_path
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: config/etc/hosts
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: Gonna write file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: wrote file
Nov 06 15:18:20 petasan-04 files_sync.py[3103]: index 212050
admin
2,918 Posts
Quote from admin on November 6, 2023, 8:07 pmThere should be a file
/opt/petasan/config/etc/hosts
and a sym link /etc/hosts pointing to in
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hostsif this was changed, then recreate the /opt/petasan/config/etc/hosts and create a symlink /etc/hosts point to it via ln -s
This should be done on all nodes. Then on a single node do:
systemctl stop petasan-file-syncano
nano /etc/hosts # make sure file is correct, edit if needed, all management ips of all nodes + localhost
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-sync
There should be a file
/opt/petasan/config/etc/hosts
and a sym link /etc/hosts pointing to in
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hosts
if this was changed, then recreate the /opt/petasan/config/etc/hosts and create a symlink /etc/hosts point to it via ln -s
This should be done on all nodes. Then on a single node do:
systemctl stop petasan-file-syncano
nano /etc/hosts # make sure file is correct, edit if needed, all management ips of all nodes + localhost
/opt/petasan/scripts/util/sync_file.py /etc/hosts
systemctl start petasan-file-sync
f.cuseo
65 Posts
Quote from f.cuseo on November 7, 2023, 8:44 amAll the nodes are already ok (symlinks and files are correct).
If I follow your instructions, stopping petasan-file-sync and issue /opt/petasan/scripts/util/sync_file.py /etc/hosts, this is what I have in /opt/petasan/log/PetaSAN.log:
07/11/2023 09:42:19 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
All the nodes are already ok (symlinks and files are correct).
If I follow your instructions, stopping petasan-file-sync and issue /opt/petasan/scripts/util/sync_file.py /etc/hosts, this is what I have in /opt/petasan/log/PetaSAN.log:
07/11/2023 09:42:19 ERROR [Errno 2] No such file or directory: '/config/etc/hosts'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PetaSAN/backend/file_sync_manager.py", line 39, in write_file
file = open(file_path.replace(self.root_path, ''), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/config/etc/hosts'
f.cuseo
65 Posts
Quote from f.cuseo on November 10, 2023, 2:50 pmHello.
There is a queue ? A db with the sync operation to do ? Because I still have this continuos error on all my nodes 🙁
Hello.
There is a queue ? A db with the sync operation to do ? Because I still have this continuos error on all my nodes 🙁
admin
2,918 Posts
Quote from admin on November 13, 2023, 10:11 pmWith all nodes having /etc/hosts a link to /opt/petasan/config/etc/hosts, as in:
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hostsGo to a hosts with valid content of /etc/hosts, then run
consul kv delete -recurse PetaSAN/Config/Files
consul kv get -recurse PetaSAN/Config/Files
/opt/petasan/scripts/util/sync_file.py /etc/hosts
consul kv get -recurse PetaSAN/Config/Files
With all nodes having /etc/hosts a link to /opt/petasan/config/etc/hosts, as in:
ls -l /etc/hosts
lrwxrwxrwx 1 root root 29 Aug 3 01:53 /etc/hosts -> /opt/petasan/config/etc/hosts
Go to a hosts with valid content of /etc/hosts, then run
consul kv delete -recurse PetaSAN/Config/Files
consul kv get -recurse PetaSAN/Config/Files
/opt/petasan/scripts/util/sync_file.py /etc/hosts
consul kv get -recurse PetaSAN/Config/Files