Skip to content

Conversation

@adamruzicka
Copy link
Contributor

No description provided.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

You need to remove test/sd_notify_test.rb as well.

@adamruzicka
Copy link
Contributor Author

I knew I forgot something, fixed

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

👍 pending packaging merge.

@ekohl
Copy link
Member

ekohl commented Sep 2, 2020

Packaging was merged. Merging this so I can send the foreman-proxy.spec update PR.

@ekohl ekohl merged commit c4334b2 into theforeman:develop Sep 2, 2020
@ekohl
Copy link
Member

ekohl commented Sep 2, 2020

I opened theforeman/foreman-packaging#5750

@adamruzicka adamruzicka deleted the sd-notify branch September 3, 2020 07:44
@lzap
Copy link
Member

lzap commented Sep 17, 2020

For the record, this patch made my life way harder because the patch extended our notification helper with ready_all method and ability to send notification after all listeners are ready (HTTP + HTTPS). The library does not support that.

#623

I wish this was never merged, adding a new dependency to write one line through a socket does not provide much value IMHO. Systemd notification is a stable API, they will unlikely change it because many programs use it today. I will need to create some kind of SdNotify helper anyway if I want to keep the correct behavior. :-(

@lzap
Copy link
Member

lzap commented Sep 17, 2020

BTW if I revert this patch, my PR rebases cleanly and it's very much improved over this version which ignores that we actually listen on multiple endpoints. I propose to put our own SdNotify back reverting this change and the dependency.

@adamruzicka
Copy link
Contributor Author

The idea here was to use a single library in sidekiq workers, smart proxy and smart proxy dynflow core, without having to copy our own implementation across three projects. So the value is not in writing a line through a socket, but in standardization.

Instead of reverting the whole thing, putting back our class and extending that can't you just make a subclass of the class provided by the dependency?

@ekohl
Copy link
Member

ekohl commented Sep 17, 2020

I agree that reverting is a bad idea. The changes in https://github.com/theforeman/smart-proxy/pull/623/files#diff-250c2220401729101b8b210180fb87c2 have little to do with the actual systemd protocol and don't belong in that class. Also note that Puma itself likely to start using it (see puma/puma#2260).

However, I'm still not convinced using Puma in the smart proxy is actually a good idea. It complicates the code base a lot and I couldn't see a real difference in how it performed.

@lzap
Copy link
Member

lzap commented Sep 17, 2020

Ok I will make a wrapper called SdNotifyAll around that library to provide support for multiple jobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants