Skip to content

cmd/initContainer: Don't rely on user D-Bus to track time zone configuration - #591

Merged
debarshiray merged 4 commits into
containers:masterfrom
debarshiray:wip/rishi/monitor-config-files
Oct 26, 2020
Merged

debarshiray merged 4 commits into
containers:masterfrom
debarshiray:wip/rishi/monitor-config-files

Conversation

@debarshiray

Copy link
Copy Markdown
Member

This is one more step towards enabling toolbox(1) to be run as root.
When invoked as 'sudo toolbox ...' there's no user or session D-Bus
instance available for the root user, which prevents the use of D-Bus
services like o.fd.Flatpak.SessionHelper.

#267

@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray debarshiray changed the title cmd/initContainer: Don't rely on user D-Bus to track /etc/localtime cmd/initContainer: Don't rely on user D-Bus to track time zone configuration Oct 23, 2020
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray
debarshiray force-pushed the wip/rishi/monitor-config-files branch from 921f50c to 2f3bab5 Compare October 23, 2020 19:54
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray
debarshiray force-pushed the wip/rishi/monitor-config-files branch from b4d1bd8 to ed1b46f Compare October 23, 2020 20:32
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray
debarshiray force-pushed the wip/rishi/monitor-config-files branch from ed1b46f to e642ae7 Compare October 23, 2020 21:22
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray
debarshiray force-pushed the wip/rishi/monitor-config-files branch from e642ae7 to c0eb08a Compare October 23, 2020 22:05
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray
debarshiray force-pushed the wip/rishi/monitor-config-files branch from c0eb08a to 5490d07 Compare October 23, 2020 22:12
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@martymichal

Copy link
Copy Markdown
Member

The last CI fail is partially caused by a race condition I introduced in #567. The fix for this is in #594. The other part (in Fedora 33) is in my opinion not caused by the CI but a bug in Podman.

This is one more step towards enabling toolbox(1) to be run as root.
When invoked as 'sudo toolbox ...' there's no user or session D-Bus
instance available for the root user, which prevents the use of D-Bus
services like org.freedesktop.Flatpak.SessionHelper.

containers#267
This is one more step towards enabling toolbox(1) to be run as root.
When invoked as 'sudo toolbox ...' there's no user or session D-Bus
instance available for the root user, which prevents the use of D-Bus
services like org.freedesktop.Flatpak.SessionHelper.

The code is forgiving to runtime errors when reacting to file system
events because it's not worth abruptly terminating the entry point
because of what might be a passing error. However, it's a lot stricter
when initially configuring the container because the failure mode isn't
as surprising for the user and it's worth starting from a valid state.

containers#267
It's no longer used to keep /etc/localtime and /etc/timezone
synchronized with the host.

containers#267
... that were created to have a bind mount at /run/host/monitor. Newly
created containers no longer need org.freedesktop.Flatpak.SessionHelper
and hence the D-Bus service doesn't need to be started for them.

containers#267
@debarshiray
debarshiray force-pushed the wip/rishi/monitor-config-files branch from 5490d07 to 82c32be Compare October 26, 2020 15:01
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@debarshiray

Copy link
Copy Markdown
Member Author

The last CI fail is partially caused by a race condition I introduced in #567.
The fix for this is in #594. The other part (in Fedora 33) is in my opinion not
caused by the CI but a bug in Podman.

Thanks for the insight. I was beginning to get a bit confused.

@debarshiray
debarshiray merged commit 82c32be into containers:master Oct 26, 2020
@debarshiray
debarshiray deleted the wip/rishi/monitor-config-files branch October 26, 2020 15:13
debarshiray pushed a commit to DaliborKr/toolbox that referenced this pull request Sep 10, 2025
Starting from Toolbx 0.0.97, released in November 2020, Toolbx
containers no longer need the org.freedesktop.Flatpak.SessionHelper
D-Bus interface.  This change was made to enable running toolbox(1) as
root [1].

It is going to be five years in a few months, since this change was
made, and it's becoming harder and harder to practically test backwards
compatibility with these containers.  All the host operating systems
where Toolbx is regularly tested offer newer versions:
  * Arch Linux and Fedora offer the latest upstream releases
  * RHEL 8.10 offers at least 0.0.99.4
  * Ubuntu offers at least 0.0.99.2 [2]

Therefore, this is a good time to mark these older containers as
deprecated, as has been done in the past in similar cases [3].  A
deprecation notice is the precursor to actually dropping support for
these old containers in the future.

[1] Commit 71b5c8c
    containers@71b5c8c0a235249b
    containers#591
    containers#267

[2] https://packages.ubuntu.com/jammy/podman-toolbox

[3] Commit 9dc5281
    containers@9dc52814301c5a3f
    containers#336

containers#1684
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.

2 participants