marvel-nccr / ansible-role-aiida

An ansible role that installs and configures AiiDA on Ubuntu.
Other
2 stars 5 forks source link

Fix systemd templates for profile name with dashes #51

Closed chrisjsewell closed 3 years ago

chrisjsewell commented 3 years ago

When a profile name included dashes (e.g. my-profile), the dashes were replaced by slashes in the systemd unit files for the AiiDA daemon / the REST API, resulting in an error upon start (profile "my/profile" not found).

Note #49 was merged to fix this, however, it was found to be faulty and reverted in #50

chrisjsewell commented 3 years ago

@ltalirz are sure this is an issue? I don't see any problem in https://github.com/marvel-nccr/ansible-role-aiida/pull/62

root@instance:/# systemctl --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid

root@instance:/# systemctl --type=service
UNIT                                  LOAD   ACTIVE SUB     DESCRIPTION                                            
aiida-daemon@name-with-dashes.service loaded active running AiiDA daemon service for profile name-with-dashes
...

perhaps it is only for an older version of sytemd?

ltalirz commented 3 years ago

50 didn't exactly revert #49 - before #49, there was a mix of %i and %I which lead to the issue (I noticed it on ubuntu 18.04).

The idea would be that after #50 it should be fixed, i.e. if you confirm it's working we can close this

chrisjsewell commented 3 years ago

Ok brilliant ta, yep definitely looks to be fixed then (I didn't know because you never answered my question 😜 https://github.com/marvel-nccr/ansible-role-aiida/pull/50#issuecomment-720504069)