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

test: Use proper ssh service unit on Debian/Ubuntu #20261

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

martinpitt
Copy link
Member

Factorize the various hardcoded unit names of the sshd socket and service units into MachineCase constants.

This will allow us to get rid of the "create sshd.service" alias hack on our Debian/Ubuntu images. This doesn't work any more on current ubuntu-stable (see cockpit-project/bots#6172), and also hides bugs as on actual installations the service really isn't called sshd.service.

On Debian/Ubuntu, the unit is called `ssh.socket`, not `sshd.socket`.
Factorize the various hardcoded unit names of the sshd socket and
service units into `MachineCase` constants.

This will allow us to get rid of the "create sshd.service" alias hack on our
Debian/Ubuntu images. This doesn't work any more on current ubuntu-stable, and
also hides bugs as on actual installations the service really isn't called
`sshd.service`.
@martinpitt martinpitt marked this pull request as ready for review April 4, 2024 12:00
@martinpitt martinpitt requested review from mvollmer and jelly and removed request for mvollmer April 4, 2024 12:00
Copy link
Member

@mvollmer mvollmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mvollmer mvollmer merged commit a8665b3 into cockpit-project:main Apr 4, 2024
74 checks passed
@martinpitt martinpitt deleted the ssh-unit branch April 4, 2024 12:39
martinpitt added a commit to martinpitt/bots that referenced this pull request Apr 4, 2024
Updating the openssh-server package while `sshd.service` is enabled
upsets the maintainer script and fails. It also causes `ssh.socket` to
fail as the port is already used.

This leads to image refresh failures whenever the current cloud image
doesn't have the current openssh-server version.

cockpit-project/cockpit#20261 fixed Cockpit's
tests to not assume `sshd.service` everywhere, so this is obsolete.
martinpitt added a commit to martinpitt/bots that referenced this pull request Apr 4, 2024
Updating the openssh-server package while `sshd.service` is enabled
upsets the maintainer script and fails. It also causes `ssh.socket` to
fail as the port is already used.

This leads to image refresh failures whenever the current cloud image
doesn't have the current openssh-server version.

cockpit-project/cockpit#20261 fixed Cockpit's
tests to not assume `sshd.service` everywhere, so this is obsolete.
jelly pushed a commit to cockpit-project/bots that referenced this pull request Apr 4, 2024
Updating the openssh-server package while `sshd.service` is enabled
upsets the maintainer script and fails. It also causes `ssh.socket` to
fail as the port is already used.

This leads to image refresh failures whenever the current cloud image
doesn't have the current openssh-server version.

cockpit-project/cockpit#20261 fixed Cockpit's
tests to not assume `sshd.service` everywhere, so this is obsolete.
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

Successfully merging this pull request may close these issues.

None yet

2 participants