Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

api_service: optionally build systemd-journal support #2868

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

lucab
Copy link
Member

@lucab lucab commented Jul 4, 2016

This introduces a 'sdjournal' tag and corresponding stubs in api_service,
turning libsystemd headers into a soft-dependency.
If systemd-journal support is enabled and sd-journal.h found at build
time, api_service will use it for logs retrieval.
This is enabled by default, but downstream can turn it off via
--enable-sdjournal=no.

Fixes #2866
Ref #2797

@jonboulle
Copy link
Contributor

nice! LGTM

)

func (s *v1AlphaAPIServer) constrainedGetLogs(request *v1alpha.GetLogsRequest, server v1alpha.PublicAPI_GetLogsServer) error {
return fmt.Errorf("missing host systemd-journal support")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather say logs unsupported without any reference to systemd.

Copy link
Member Author

Choose a reason for hiding this comment

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

ack, unsupported logging subsystem seems better for the generic case.

@s-urbaniak
Copy link
Contributor

Just a small nitpick, else lgtm 👍

@lucab lucab force-pushed the to-upstream/enable-sdjournal branch from 33d4d72 to 46b101c Compare July 4, 2016 11:42
)

func (s *v1AlphaAPIServer) constrainedGetLogs(request *v1alpha.GetLogsRequest, server v1alpha.PublicAPI_GetLogsServer) error {
return fmt.Errorf("unsupported logging subsystem")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is misleading. How about "rkt built without logging support"?

Copy link
Member Author

@lucab lucab Jul 4, 2016

Choose a reason for hiding this comment

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

Also ok for me. Further proposal: api-service has another "not implemented yet" stub for ListenEvents; what about unifying both under a ErrApiNotSupported = "operation not supported"? @s-urbaniak too broad?

Copy link
Contributor

Choose a reason for hiding this comment

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

This error is more useful for console output rather than an err equality check like io.EOF. I'd keep them as separate errors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Uhm, ok.

@lucab
Copy link
Member Author

lucab commented Jul 4, 2016

This will probably conflict with #2684, holding it for the moment (to be serialized after that).

This introduces a 'sdjournal' tag and corresponding stubs in api_service,
turning libsystemd headers into a soft-dependency.
If systemd-journal support is enabled and `sd-journal.h` found at build
time, api_service will use it for logs retrieval.
This is enabled by default, but downstream can turn it off via
`--enable-sdjournal=no`.
@lucab
Copy link
Member Author

lucab commented Jul 12, 2016

It looks like other PRs are being blocked by this, and the conflicting one is not landing as quick as expected, so I'm merging this first.

@lucab lucab added this to the v1.11.0 milestone Jul 12, 2016
@lucab lucab merged commit 64e931a into rkt:master Jul 12, 2016
@jonboulle
Copy link
Contributor

posthumous LGTM

gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Jul 19, 2016
This includes the patch from rkt/rkt#2868
and --enable-sdjournal=no is passed to econf when USE=systemd is
not enabled.

Package-Manager: portage-2.3.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants