openvstorage / framework

The Framework is a set of components and tools which brings the user an interface (GUI / API) to setup, extend and manage an Open vStorage platform.
Other
27 stars 23 forks source link

Volumedriver service files might have some issues #1964

Open JeffreyDevloo opened 6 years ago

JeffreyDevloo commented 6 years ago

Problem description

A lot of the following logs:

Feb 07 08:00:04 DEV-3N-199-181 systemd[1]: [/lib/systemd/system/ovs-volumedriver_myvpool01.service:9] Invalid escape sequences in line, correcting: "/bin/bash -c "if [ ! -d /opt/OpenvStorage/run ]; then mkdir /opt/OpenvStorage/run; chown ovs:ovs /opt/OpenvStorage/run; fi; touch /opt/OpenvStorage/run/storagedriver_myvpool01.lock; echo volumedriver-ee-server=`volumedriver_fs --version | grep version\: | grep -o [a-zA-Z0-9\.\-]*$` > /opt/OpenvStorage/run/volumedriver_myvpool01.version""
Feb 07 08:00:04 DEV-3N-199-181 systemd[1]: [/lib/systemd/system/ovs-volumedriver_myvpool01.service:9] Invalid escape sequences in line, correcting: "/bin/bash -c "if [ ! -d /opt/OpenvStorage/run ]; then mkdir /opt/OpenvStorage/run; chown ovs:ovs /opt/OpenvStorage/run; fi; touch /opt/OpenvStorage/run/storagedriver_myvpool01.lock; echo volumedriver-ee-server=`volumedriver_fs --version | grep version\: | grep -o [a-zA-Z0-9\.\-]*$` > /opt/OpenvStorage/run/volumedriver_myvpool01.version""
Feb 07 08:00:05 DEV-3N-199-181 systemd[1]: [/lib/systemd/system/ovs-volumedriver_myvpool01.service:9] Invalid escape sequences in line, correcting: "/bin/bash -c "if [ ! -d /opt/OpenvStorage/run ]; then mkdir /opt/OpenvStorage/run; chown ovs:ovs /opt/OpenvStorage/run; fi; touch /opt/OpenvStorage/run/storagedriver_myvpool01.lock; echo volumedriver-ee-server=`volumedriver_fs --version | grep version\: | grep -o [a-zA-Z0-9\.\-]*$` > /opt/OpenvStorage/run/volumedriver_myvpool01.version""
Feb 07 08:00:05 DEV-3N-199-181 volumedriver_fs.sh[15332]: 2018-02-07 08:00:05 864107 +0100 - DEV-3N-199-181 - 15332/0x00007f1d80ff7700 - volumedriverfs/VFSRemoteNode - 000000000000caf4 - info - operator(): got keepalive rsp from myvpool01tFi5wkmRqptxTYKC
Feb 07 08:00:05 DEV-3N-199-181 systemd[1]: [/lib/systemd/system/ovs-volumedriver_myvpool01.service:9] Invalid escape sequences in line, correcting: "/bin/bash -c "if [ ! -d /opt/OpenvStorage/run ]; then mkdir /opt/OpenvStorage/run; chown ovs:ovs /opt/OpenvStorage/run; fi; touch /opt/OpenvStorage/run/storagedriver_myvpool01.lock; echo volumedriver-ee-server=`volumedriver_fs --version | grep version\: | grep -o [a-zA-Z0-9\.\-]*$` > /opt/OpenvStorage/run/volumedriver_myvpool01.version""
Feb 07 08:00:05 DEV-3N-199-181 systemd[1]: [/lib/systemd/system/ovs-volumedriver_myvpool01.service:9] Invalid escape sequences in line, correcting: "/bin/bash -c "if [ ! -d /opt/OpenvStorage/run ]; then mkdir /opt/OpenvStorage/run; chown ovs:ovs /opt/OpenvStorage/run; fi; touch /opt/OpenvStorage/run/storagedriver_myvpool01.lock; echo volumedriver-ee-server=`volumedriver_fs --version | grep version\: | grep -o [a-zA-Z0-9\.\-]*$` > /opt/OpenvStorage/run/volumedriver_myvpool01.version""
JeffreyDevloo commented 6 years ago

Contents changed from

root@DEV-3N-199-171:~# cat /lib/systemd/system/ovs-volumedriver_myvpool01.service 
[Unit]
Description=Open vStorage StorageDriver
After=ovs-watcher-volumedriver.service
Wants=ovs-watcher-volumedriver.service

[Service]
Type=simple
Environment=METADATASTORE_BITS=5
ExecStartPre=/bin/bash -c "if [ ! -d /opt/OpenvStorage/run ]; then mkdir /opt/OpenvStorage/run; chown ovs:ovs /opt/OpenvStorage/run; fi; touch /opt/OpenvStorage/run/storagedriver_myvpool01.lock; echo volumedriver-server=`volumedriver_fs --version | grep version: | awk '{print $2}'` > /opt/OpenvStorage/run/volumedriver_myvpool01.version"
ExecStart=/usr/bin/volumedriver_fs.sh -f --config arakoon://config/ovs/vpools/9f6b0b30-08e2-4b2b-aba4-5633bb162f6a/hosts/myvpool01ab20YeflMCnapztw/config?ini=%2Fopt%2FOpenvStorage%2Fconfig%2Farakoon_cacc.ini --lock-file /opt/OpenvStorage/run/storagedriver_myvpool01.lock --logrotation --mountpoint /mnt/myvpool01 --logsink console: -o big_writes -o sync_read -o allow_other -o use_ino -o default_permissions -o uid=1001 -o gid=1001 -o umask=0002
ExecStop=/bin/bash -c "if mount | grep /mnt/myvpool01; then fusermount -u /mnt/myvpool01; fi "
ExecStopPost=/bin/bash -c "for i in `seq 0 9`; do if mount | grep /mnt/myvpool01; then sleep 10s; else break; fi; done; if mount | grep /mnt/myvpool01; then umount -l /mnt/myvpool01; ps xa |grep volumedriver_fs |grep -v grep |awk '{print $1}' |xargs kill; fi; rm /opt/OpenvStorage/run/storagedriver_myvpool01.lock"
Restart=on-failure
RestartSec=360
TimeoutStopSec=30
LimitMEMLOCK=infinity

[Install]
WantedBy=multi-user.target ovs-watcher-volumedriver.service

To

root@DEV-3N-199-181:~# cat /lib/systemd/system/ovs-volumedriver_myvpool01.service
[Unit]
Description=Open vStorage StorageDriver
After=ovs-watcher-volumedriver.service
Wants=ovs-watcher-volumedriver.service

[Service]
Type=simple
Environment=METADATASTORE_BITS=5
ExecStartPre=/bin/bash -c "if [ ! -d /opt/OpenvStorage/run ]; then mkdir /opt/OpenvStorage/run; chown ovs:ovs /opt/OpenvStorage/run; fi; touch /opt/OpenvStorage/run/storagedriver_myvpool01.lock; echo volumedriver-ee-server=`volumedriver_fs --version | grep version\: | grep -o [a-zA-Z0-9\.\-]*$` > /opt/OpenvStorage/run/volumedriver_myvpool01.version"
ExecStart=/usr/bin/volumedriver_fs.sh -f --config arakoon://config/ovs/vpools/20189765-339f-4613-8a59-4cc6ff653a3f/hosts/myvpool01jjG7P4cP9obM6Cew/config?ini=%2Fopt%2FOpenvStorage%2Fconfig%2Farakoon_cacc.ini --lock-file /opt/OpenvStorage/run/storagedriver_myvpool01.lock --logrotation --mountpoint /mnt/myvpool01 --logsink console: -o big_writes -o sync_read -o allow_other -o use_ino -o default_permissions -o uid=1001 -o gid=1001 -o umask=0002
ExecStop=/bin/bash -c "if mount | grep /mnt/myvpool01; then fusermount -u /mnt/myvpool01; fi "
ExecStopPost=/bin/bash -c "for i in `seq 0 9`; do if mount | grep 'on /mnt/myvpool01 type '; then sleep 10s; else break; fi; done; if mount | grep 'on /mnt/myvpool01 type '; then umount -l /mnt/myvpool01; pkill -f -- 'volumedriver_fs .*--mountpoint /mnt/myvpool01'; fi; rm /opt/OpenvStorage/run/storagedriver_myvpool01.lock"
Restart=on-failure
RestartSec=360
TimeoutStopSec=30
LimitMEMLOCK=infinity

[Install]
WantedBy=multi-user.target ovs-watcher-volumedriver.service
JeffreyDevloo commented 6 years ago

Seems like the backslashes are giving off these logs. Not a real error but a minor annoyance Systemd expects them to be escaped like \