OpenAoE / vblade

The Minimal Userland AoE Target
GNU General Public License v2.0
51 stars 16 forks source link

issues with vblade-persistence #14

Closed beta-tester closed 4 years ago

beta-tester commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

ecashin commented 4 years ago

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

beta-tester commented 4 years ago

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

beta-tester commented 4 years ago

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 commented 4 years ago

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

ecashin commented 4 years ago

It's great that you followed up with this important information! Thank you very much, beta-tester.

On Sat, Jun 20, 2020 at 10:12 AM beta-tester notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OpenAoE/vblade/issues/14#issuecomment-647000917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4FBIKZMXGS6Q2JYPMZW3RXS7WBANCNFSM4NR6ZDDA .

cbiedl commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Hi, Christoph.

I think the main README already points to the mailing list, and the README for the contrib mentions contrib-related stuff, so things are OK. But feel free to submit pull requests---It's always easier to have concrete discussions on pull requests.

Thanks!

On Sat, Jun 20, 2020 at 1:29 PM cbiedl notifications@github.com wrote:

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 https://github.com/ecashin is fine with that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenAoE/vblade/issues/14#issuecomment-647024296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4FBO6QC335ISX4HD7IZDRXTWWLANCNFSM4NR6ZDDA .