Skip to content
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

issues with vblade-persistence #14

Closed
beta-tester opened this issue Jun 3, 2020 · 11 comments
Closed

issues with vblade-persistence #14

beta-tester opened this issue Jun 3, 2020 · 11 comments

Comments

@beta-tester
Copy link

hello,
i try to user vblade and vblade-persistence under debian buster (Raspberry Pi OS).

i have an iso image /srv/iso/opensuse-rescue-x64.iso
the content of the created configuration file /etc/vblade.conf.d/opensuse-rescue-x64.conf is:

shelf=0
slot=1
netif=eth0
filename=/srv/iso/opensuse-rescue-x64.iso
options='-r'
ionice='--class best-effort --classdata 7'

but the service does not start.

pi@pxe-server:~ $ sudo systemctl status vblade@opensuse-rescue-x64.service
Warning: The unit file, source configuration file or drop-ins of vblade@opensuse-rescue-x64.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for vblade@opensuse-rescue-x64.service failed because of unavailable resources or another system error.
See "systemctl status vblade@opensuse-rescue-x64.service" and "journalctl -xe" for details.

i already did sudo systemctl daemon-reload

but still:

pi@pxe-server:~ $ sudo systemctl list-units | grep vblade
  vblade.service                                                                                                                                     loaded active exited    vblade exports                                                                               
  vblade@opensuse\x2drescue\x2dx64.service                                                                                                           loaded active running   vblade instance opensuse-rescue-x64                                                          
  vblade@opensuse\x2dx64.service                                                                                                                     loaded active running   vblade instance opensuse-x64                                                                 
  system-vblade.slice                                                                                                                                loaded active active    system-vblade.slice                                                                          
pi@pxe-server:~ $ sudo systemctl status vblade@opensuse\x2drescue\x2dx64.service
Warning: The unit file, source configuration file or drop-ins of vblade@opensusex2drescuex2dx64.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● vblade@opensusex2drescuex2dx64.service - vblade instance opensusex2drescuex2dx64
   Loaded: loaded (/etc/vblade.conf.d/opensusex2drescuex2dx64.conf; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:vblade(8)
pi@pxe-server:~ $ sudo systemctl status vblade@opensuse-rescue-x64.service
Warning: The unit file, source configuration file or drop-ins of vblade@opensuse-rescue-x64.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● vblade@opensuse-rescue-x64.service - vblade instance opensuse/rescue/x64
   Loaded: loaded (/etc/vblade.conf.d/opensuse/rescue/x64.conf; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:vblade(8)

Jun 03 21:06:48 pxe-server systemd[1]: vblade@opensuse-rescue-x64.service: Failed with result 'resources'.
Jun 03 21:06:48 pxe-server systemd[1]: Failed to start vblade instance opensuse/rescue/x64.
Jun 03 21:06:59 pxe-server systemd[1]: vblade@opensuse-rescue-x64.service: Service RestartSec=10s expired, scheduling restart.
Jun 03 21:06:59 pxe-server systemd[1]: vblade@opensuse-rescue-x64.service: Scheduled restart job, restart counter is at 76.
Jun 03 21:06:59 pxe-server systemd[1]: Stopped vblade instance opensuse/rescue/x64.
Jun 03 21:06:59 pxe-server systemd[1]: vblade@opensuse-rescue-x64.service: Failed to load environment files: No such file or directory
Jun 03 21:06:59 pxe-server systemd[1]: vblade@opensuse-rescue-x64.service: Failed to run 'start' task: No such file or directory
Jun 03 21:06:59 pxe-server systemd[1]: vblade@opensuse-rescue-x64.service: Failed with result 'resources'.
Jun 03 21:06:59 pxe-server systemd[1]: Failed to start vblade instance opensuse/rescue/x64.
Jun 03 21:07:06 pxe-server systemd[1]: Stopped vblade instance opensuse/rescue/x64.

there is also something strange with the naming of the instances.
all '-' (dashes) are removed by something else.

@beta-tester
Copy link
Author

beta-tester commented Jun 4, 2020

when i use file names without '-' (dash) for the /etc/vblade.conf.d/xxxx.conf file, then everything seems to be good.

why does vblade-persistence transforms the file name with '-' in such a way to an instance name?
from /etc/vblade.conf.d/opensuse-rescue-x64.conf
to vblade@opensuse\x2drescue\x2dx64.service

and why can't vbladed-persistence handle its own transformed instance-/service- name?

@ecashin
Copy link
Contributor

ecashin commented Jun 17, 2020

This issue is about contributed functionality. Have you tried reaching out to the author of that contrib? He might not know about this issue on github.

@beta-tester
Copy link
Author

i don't know who is the author vblade-persistence...
i thought it is made/maintained by the author of vblade.

@ecashin
Copy link
Contributor

ecashin commented Jun 17, 2020

I see the author in contrib/persistence/vblade-persistence.txt.

@beta-tester
Copy link
Author

thank you, i wrote an email...
hopefully this email address is still active and the author will response.

@beta-tester
Copy link
Author

beta-tester commented Jun 17, 2020

in https://github.com/OpenAoE/vblade/blob/master/contrib/persistence/vblade-generator

INSTANCE="$(systemd-escape "${CONFIG%%.conf}")"

the systemd-escape command is the cause that the filename is transformed to the strange service name.
so somewhere a systemd-escape --unescape command is missing

@beta-tester
Copy link
Author

I have to apologize to you.
I can no longer reproduce my reported issue myself.
...sorry.

@ecashin
Copy link
Contributor

ecashin commented Jun 20, 2020 via email

@cbiedl
Copy link

cbiedl commented Jun 20, 2020

vblade-persistence author here. I managed to recreate the issue and will try to understand what happens here.
Related, I'd prepare a pull request including some minor fixes and a small readme that points to the mailing list for questions about this contribution of mine - if @ecashin is fine with that.

@beta-tester
Copy link
Author

beta-tester commented Jun 20, 2020

on my site, i changed the way how i add/remove vblade-persistence entries:
to add / enable:

cat << EOF | sudo tee /etc/vblade.conf.d/opensuse-rescue-x64.conf
shelf=0
slot=1
netif=eth0
filename=/srv/iso/opensuse-rescue-x64.iso
options='-r'
ionice='--class best-effort --classdata 7'
EOF

sudo systemctl daemon-reload
sudo systemctl restart vblade.service

to remove / disable (or modify + restart):

sudo systemctl stop vblade@$(systemd-escape opensuse-rescue-x64).service

sudo rm /etc/vblade.conf.d/opensuse-rescue-x64.conf
# or modify /etc/vblade.conf.d/opensuse-rescue-x64.conf

sudo systemctl daemon-reload
sudo systemctl restart vblade.service

maybe it is an ugly way, maybe not all steps are necessary,
but for me at least it will enable / disable the vblade services.

@ecashin
Copy link
Contributor

ecashin commented Jun 22, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants