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

Get rid of systemV #9078

Merged
merged 5 commits into from
Feb 19, 2020
Merged

Conversation

eduardoj
Copy link
Member

As systemd is being used to manage OBS services, systemV method calls are no longer needed. Removing systemV code and compatibility packages (as insserv-compat) makes it more clear OBS services handling.

Labelling as "DO NOT MERGE" untill the changes in the service scripts are tested. The pull request was created to receive feedback about removing systemV from the OBS codebase.

@eduardoj eduardoj added Packages 📦 Things regarding our RPM packages DO NOT MERGE ⚠️ Explain yourself if you add/remove this label to a PR labels Feb 12, 2020
@eduardoj
Copy link
Member Author

All the tests done passed, confirming that the services involved were succesfully reloaded:

  • manually upgrading the obs-server and obs-worker packages
  • manually reinstalling the same packages
  • and also obs-server and upgrade-lastest kanku tests, thanks to @M0ses.

Removing the "DO NOT MERGE" label. The pull request is ready to review.

@eduardoj eduardoj removed the DO NOT MERGE ⚠️ Explain yourself if you add/remove this label to a PR label Feb 13, 2020
@@ -188,7 +188,6 @@ BuildRequires: obs-server-macros

%if 0%{?suse_version:1}
BuildRequires: fdupes
PreReq: %insserv_prereq permissions pwdutils
Copy link
Member

Choose a reason for hiding this comment

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

actually, yes "permissions" can go as well, as "%run_permissions" call was removed in commit d0c101d from 2013 ...
but then the cleanup needs to be completed by removing

%verifyscript -n obs-server
%verify_permissions

as well ...

and "pwdutils" should be kept, but replaced by "shadow" as it's still used here:
%triggerin -n obs-server -- docker
usermod -a -G docker obsservicerun

so this should IMHO be:
-PreReq: %insserv_prereq permissions pwdutils
+Requires(pre): shadow

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! %verify* lines removed, and suggested patch applied.

@@ -276,7 +269,6 @@ Summary: The Open Build Service -- base configuration files
Group: Productivity/Networking/Web/Utilities
%if 0%{?suse_version}
Requires(pre): shadow
PreReq: %fillup_prereq
Copy link
Member

Choose a reason for hiding this comment

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

no, this is still needed for the %fillup_only call,
should probably be replaced by
Requires(pre): %fillup_prereq

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

dist/obsworker Outdated
check_vmcp || rc_status -v
create_initrd $OBS_VM_KERNEL $OBS_VM_INITRD || rc_status -v
check_vmcp
create_initrd $OBS_VM_KERNEL $OBS_VM_INITRD
Copy link
Member

Choose a reason for hiding this comment

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

you're loosing the state here, should probably just be

check_vmcp || exit 1
create_initrd .... || exit 1

or something else to fail if intermediate steps have failed

Copy link
Member Author

@eduardoj eduardoj Feb 14, 2020

Choose a reason for hiding this comment

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

Done. I substituted these lines as you proposed and added a comment in the description of the affected commit.

Please, re-review it again.

Copy link
Member

@bugfinder bugfinder left a comment

Choose a reason for hiding this comment

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

please see my inline comments above

@eduardoj eduardoj force-pushed the move_obsworker_to_systemd branch 2 times, most recently from 55fbbfd to 09e81f1 Compare February 14, 2020 12:06
Copy link
Contributor

@M0ses M0ses left a comment

Choose a reason for hiding this comment

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

LGTM

This script is called from the systemd obsworker.service file. It
doesn't need to call systemV methods.

This is part of removing systemV from the codebase.

Also substitute a couple of `rc_status` calls with `exit 1`, to make
sure that an error in the previous step gets cached.
This script is called from the systemd obsstoragesetup.service file. It
doesn't need to call systemV methods.

This is part of removing systemV from the codebase.
This script is called from the systemd obsscheduler.service file. It
doesn't need to call systemV methods.

This is part of removing systemV from the codebase.
This file defined three methods used in systemV scripts that are not
used any more, and no longer needed.
As all the calls to systemV methods are removed, the insserv-compat
package is no longer needed.
@eduardoj
Copy link
Member Author

"OBS Package Build" tests failed after merging the "Update rack" pull request. I only rebased with master. Waiting for the tests to pass to merge the pull request.

@M0ses M0ses merged commit e49022c into openSUSE:master Feb 19, 2020
@eduardoj eduardoj deleted the move_obsworker_to_systemd branch February 20, 2020 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages 📦 Things regarding our RPM packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants