You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think I understand how to use the systemd restart function from #147. Any changes I make to the systemd service file are noticed by fetchit but it doesn't actually restart the service. The log always says "Systemd target sysd-enable httpd.service complete", I don't understand why it's not hitting the code at https://github.com/containers/fetchit/blob/main/pkg/engine/systemd.go#L196 instead. I tried this in both root & rootless with the same results.
Here's a sample log I just created - notice it says "enable" not "restart"
2024-05-04T03:30:00.016Z INFO engine/apply.go:93 git clone git@gitea.thebandit.org:thebandit/fetchit-config.git using SSH key /opt/mount/.ssh/id_ed25519
2024-05-04T03:30:00.182Z INFO engine/systemd.go:166 Deploying systemd file(s) fetchit-config/lela-root/systemd/httpd.service
2024-05-04T03:30:00.700Z INFO engine/filetransfer.go:100 Deploying file(s) fetchit-config/lela-root/systemd/httpd.service
2024-05-04T03:30:01.144Z INFO engine/systemd.go:206 Systemd target: sysd, running systemctl enable httpd.service
2024-05-04T03:30:05.669Z INFO engine/systemd.go:261 Systemd target sysd-enable httpd.service complete
2024-05-04T03:30:05.670Z INFO engine/common.go:97 Moved sysd from a42334793 to d700a910a1dbcc00650f70997ab584afde05bed0 for git target git@gitea.thebandit.org:thebandit/fetchit-config.git
^C[root@lela ~]# podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a601fad10a95 quay.io/fetchit/fetchit:latest entry.sh 16 minutes ago Up 16 minutes fetchit-root
d6a1c416eea2 registry.access.redhat.com/ubi8/httpd-24:latest /usr/bin/run-http... 15 minutes ago Up 15 minutes 0.0.0.0:8080->8080/tcp httpd
[root@lela ~]# date
Fri May 3 21:30:24 MDT 2024
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I don't think I understand how to use the systemd restart function from #147. Any changes I make to the systemd service file are noticed by fetchit but it doesn't actually restart the service. The log always says "Systemd target sysd-enable httpd.service complete", I don't understand why it's not hitting the code at https://github.com/containers/fetchit/blob/main/pkg/engine/systemd.go#L196 instead. I tried this in both root & rootless with the same results.
Here's a sample log I just created - notice it says "enable" not "restart"
Here's my fetchit config:
Thanks in advance for any help!
Update: After reviewing the code more, I think the problem may be that at https://github.com/containers/fetchit/blob/main/pkg/engine/systemd.go#L148 it essentially changes the meaning of "initialRun" to "initialRun || (change != nil)" so then starting at https://github.com/containers/fetchit/blob/main/pkg/engine/systemd.go#L190 the code needs to work differently.
Here's my initial thoughts, does this seem like I'm on the right track?Update 2: This code does not work, I submitted a PR with code that does work in my testing.
Beta Was this translation helpful? Give feedback.
All reactions