Skip to content

Commit

Permalink
Swift to the distributed object expirer
Browse files Browse the repository at this point in the history
We should have done this for Ussuri, but fortunately the deprecation
cycles in Swift are very long, especially for something this invasive.
But it's time to get on with it.

The essense of the change is that object expirers run on object
server nodes now. So much effort was spent on explaining to
packagers that object-expirer service belongs to the
openstack-swift-proxy package, and now we basically have
to revert to what used to be a packaging mistake.

We set dequeue_from_legacy to true, because there's no
alternative at present.

This commit also rearranges some configs and other files
so they end in a proper subpackage.

Change-Id: Ia5385098d3b47a365978bba42a6e09d603913cec
  • Loading branch information
Pete Zaitcev authored and zaitcev committed Mar 19, 2021
1 parent aeae6b8 commit 0014419
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 34 deletions.
20 changes: 0 additions & 20 deletions object-expirer.conf

This file was deleted.

5 changes: 4 additions & 1 deletion object-server.conf
Expand Up @@ -16,8 +16,11 @@ use = egg:swift#object

[object-replicator]

[object-reconstructor]

[object-updater]

[object-auditor]

[object-reconstructor]
[object-expirer]
dequeue_from_legacy_queue = true
2 changes: 1 addition & 1 deletion openstack-swift-object-expirer.service
Expand Up @@ -5,7 +5,7 @@ After=syslog.target network.target
[Service]
Type=simple
User=swift
ExecStart=/usr/bin/swift-object-expirer /etc/swift/object-expirer.conf
ExecStart=/usr/bin/swift-object-expirer /etc/swift/object-server.conf

[Install]
WantedBy=multi-user.target
21 changes: 9 additions & 12 deletions openstack-swift.spec
Expand Up @@ -58,7 +58,6 @@ Source59: %{name}-object-expirer.service
Source63: %{name}-container-reconciler.service
Source6: %{name}-proxy.service
Source61: proxy-server.conf
Source62: object-expirer.conf
Source64: container-reconciler.conf
Source20: %{name}.tmpfs
Source7: swift.conf
Expand Down Expand Up @@ -288,7 +287,6 @@ install -p -D -m 660 %{SOURCE22} %{buildroot}%{_sysconfdir}/swift/account-server
install -p -D -m 660 %{SOURCE42} %{buildroot}%{_sysconfdir}/swift/container-server.conf
install -p -D -m 660 %{SOURCE52} %{buildroot}%{_sysconfdir}/swift/object-server.conf
install -p -D -m 660 %{SOURCE61} %{buildroot}%{_sysconfdir}/swift/proxy-server.conf
install -p -D -m 660 %{SOURCE62} %{buildroot}%{_sysconfdir}/swift/object-expirer.conf
install -p -D -m 660 %{SOURCE64} %{buildroot}%{_sysconfdir}/swift/container-reconciler.conf
install -p -D -m 660 %{SOURCE7} %{buildroot}%{_sysconfdir}/swift/swift.conf
install -p -D -m 660 %{SOURCE77} %{buildroot}%{_sysconfdir}/swift/internal-client.conf
Expand Down Expand Up @@ -392,36 +390,36 @@ exit 0

%post object
%systemd_post %{name}-object.service
%systemd_post %{name}-object-expirer.service
%systemd_post %{name}-object-replicator.service
%systemd_post %{name}-object-reconstructor.service
%systemd_post %{name}-object-auditor.service
%systemd_post %{name}-object-updater.service

%preun object
%systemd_preun %{name}-object.service
%systemd_preun %{name}-object-expirer.service
%systemd_preun %{name}-object-replicator.service
%systemd_preun %{name}-object-reconstructor.service
%systemd_preun %{name}-object-auditor.service
%systemd_preun %{name}-object-updater.service

%postun object
%systemd_postun %{name}-object.service
%systemd_postun %{name}-object-expirer.service
%systemd_postun %{name}-object-replicator.service
%systemd_postun %{name}-object-reconstructor.service
%systemd_postun %{name}-object-auditor.service
%systemd_postun %{name}-object-updater.service

%post proxy
%systemd_post %{name}-proxy.service
%systemd_post %{name}-object-expirer.service

%preun proxy
%systemd_preun %{name}-proxy.service
%systemd_preun %{name}-object-expirer.service

%postun proxy
%systemd_postun %{name}-proxy.service
%systemd_postun %{name}-object-expirer.service

%post -n python3-swift
/usr/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || :
Expand All @@ -445,6 +443,7 @@ exit 0
%{_mandir}/man1/swift-orphans.1*
%{_mandir}/man1/swift-recon.1*
%{_mandir}/man1/swift-recon-cron.1*
%{_mandir}/man1/swift-reconciler-enqueue.1*
%{_mandir}/man1/swift-ring-builder.1*
%{_mandir}/man1/swift-ring-composer.1*
%{_mandir}/man5/swift.conf.5*
Expand Down Expand Up @@ -528,16 +527,20 @@ exit 0
%files object
%defattr(-,root,root,-)
%{_mandir}/man5/object-server.conf.5*
%{_mandir}/man5/object-expirer.conf.5*
%{_mandir}/man1/swift-object-auditor.1*
%{_mandir}/man1/swift-object-expirer.1*
%{_mandir}/man1/swift-object-info.1*
%{_mandir}/man1/swift-object-reconstructor.1*
%{_mandir}/man1/swift-object-relinker.1*
%{_mandir}/man1/swift-object-replicator.1*
%{_mandir}/man1/swift-object-server.1*
%{_mandir}/man1/swift-object-updater.1*
%{_unitdir}/%{name}-object.service
%{_unitdir}/%{name}-object@.service
%{_unitdir}/%{name}-object-auditor.service
%{_unitdir}/%{name}-object-auditor@.service
%{_unitdir}/%{name}-object-expirer.service
%{_unitdir}/%{name}-object-replicator.service
%{_unitdir}/%{name}-object-replicator@.service
%{_unitdir}/%{name}-object-reconstructor.service
Expand All @@ -548,6 +551,7 @@ exit 0
%config(noreplace) %attr(640, swift, swift) %{_sysconfdir}/swift/object-server.conf
%dir %attr(0755, swift, root) %{_localstatedir}/run/swift/object-server
%{_bindir}/swift-object-auditor
%{_bindir}/swift-object-expirer
%{_bindir}/swift-object-info
%{_bindir}/swift-object-replicator
%{_bindir}/swift-object-relinker
Expand All @@ -557,24 +561,17 @@ exit 0

%files proxy
%defattr(-,root,root,-)
%{_mandir}/man5/object-expirer.conf.5*
%{_mandir}/man5/proxy-server.conf.5*
%{_mandir}/man5/container-reconciler.conf.5*
%{_mandir}/man1/swift-container-reconciler.1*
%{_mandir}/man1/swift-object-expirer.1*
%{_mandir}/man1/swift-proxy-server.1*
%{_mandir}/man1/swift-reconciler-enqueue.1*
%{_mandir}/man1/swift-object-relinker.1*
%{_unitdir}/%{name}-container-reconciler.service
%{_unitdir}/%{name}-object-expirer.service
%{_unitdir}/%{name}-proxy.service
%dir %{_sysconfdir}/swift/proxy-server
%config(noreplace) %attr(640, root, swift) %{_sysconfdir}/swift/container-reconciler.conf
%config(noreplace) %attr(640, root, swift) %{_sysconfdir}/swift/proxy-server.conf
%config(noreplace) %attr(640, root, swift) %{_sysconfdir}/swift/object-expirer.conf
%dir %attr(0755, swift, root) %{_localstatedir}/run/swift/proxy-server
%{_bindir}/swift-container-reconciler
%{_bindir}/swift-object-expirer
%{_bindir}/swift-proxy-server

%if 0%{?with_doc}
Expand Down

0 comments on commit 0014419

Please sign in to comment.