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

Fixed issue where yast2-vpn breaks with strongswan #22

Merged
merged 1 commit into from
May 10, 2023

Conversation

m5aquib
Copy link
Contributor

@m5aquib m5aquib commented Apr 5, 2023

Problem

Short description of the original problem.
yast2-vpn is currently broken with strongswan packages in SLE15 (all SPs) and Leap15.x + Tumbleweed
strongswan version < 5.8.0 used strongswan.service to use with ipsec interface with yast uses. Later versions
have moved to use strongswan-starter.service to use ipsec and strongswan.service is used for swanctl interface
Thus, with newer versions yast is still using the older systemd service file and causing breakage.

Solution

Short description of the fix.
Fix has been submitted to SLE15 (all SPs) + Factory --> https://build.opensuse.org/request/show/1077377
merging with the codestreams might take some time
but yast2-vpn needs to call the correct systemd service to work properly

Testing

  • Tested manually
    Tested manually with the changes and yast2-vpn module is working correctly

@m5aquib
Copy link
Contributor Author

m5aquib commented Apr 12, 2023

Changes have been merged into SLE 15 SP5
https://build.suse.de/package/show/SUSE:SLE-15-SP5:Update/strongswan

Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

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

Approved with a small note.

Service.Enable("strongswan")
if !(Service.Active("strongswan") ? Service.Restart("strongswan") : Service.Start("strongswan"))
Service.Enable("strongswan-starter")
if !(Service.Active("ipsec") ? Service.Restart("ipsec") : Service.Start("ipsec"))
Copy link
Member

Choose a reason for hiding this comment

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

IIRC restarting a stopped service should be the same as starting it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it is same. restart = stop + start (doesn't care if it's already stopped)

Copy link
Member

Choose a reason for hiding this comment

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

So, are we gonna change this to

Suggested change
if !(Service.Active("ipsec") ? Service.Restart("ipsec") : Service.Start("ipsec"))
Service.Restart("ipsec")

or simply go ahead as it is now?

I'm asking in order to move it forward. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I did not write the original code, I just changed it to point to correct strongswan service file. @dgdavid The change you suggested makes sense but I'm not sure if it'll cause any regressions in the yast2-vpn. There is green signal from me to go ahead as I've tested and it works. I suggest that if such change needs to be done it should done by the maintainer of yast2-vpn module.

Copy link
Member

Choose a reason for hiding this comment

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

@m5aquib I agree.

So, since it was already approved by @lslezak we can go ahead and merge it.

Thanks a lot!

@dgdavid dgdavid merged commit 2cc0641 into yast:master May 10, 2023
@yast-bot
Copy link

✔️ Public Jenkins job #23 successfully finished
✔️ Created OBS submit request #1086052

@yast-bot
Copy link

yast-bot commented Aug 7, 2023

✔️ Internal Jenkins job #17 successfully finished
✔️ Created IBS submit request #304843

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.

4 participants