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

(RHEL-73780) Stash the subscriber list when we disconenct from the bus #52

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jamacku
Copy link
Member

@jamacku jamacku commented Jan 15, 2025

No description provided.

@jamacku jamacku added this to the RHEL-10.0 milestone Jan 15, 2025
@github-actions github-actions bot changed the title Stash the subscriber list when we disconenct from the bus (RHEL-73780) Stash the subscriber list when we disconenct from the bus Jan 15, 2025
Copy link

github-actions bot commented Jan 15, 2025

Commit validation

Tracker - RHEL-73780

The following commits meet all requirements

commit upstream
c54275f - dbus: stash the subscriber list when we disconenct from the bus systemd/systemd@8402ca0
cdac76c - manager: s/deserialized_subscribed/subscribed_as_strv systemd/systemd@e1315a6
758b5e4 - shared/bus-util: move bus_message_read_id128() to bus-message-util systemd/systemd@ab33edb
c9b21b8 - shared/bus-util: move bus_message_hash_ops to bus-message-util systemd/systemd@e3d3762
0548a10 - shared/bus-util: move string set append/get funcs to bus-message-util … systemd/systemd@91080bc
112b8f2 - shared/serialize: make input params const systemd/systemd@3f03d39
cc77790 - shared/serialize: introduce serialize_id128() systemd/systemd@38a2c2b
3235610 - bus-util: do not reset the count returned by sd_bus_track_count_name()… systemd/systemd@33eeea4
01247d3 - core/manager: use FOREACH_ARRAY at one more place systemd/systemd@a751626
2d41f34 - core/manager: drop duplicate bus track deserialization systemd/systemd@af0e103
e8dc58b - bus-util: introduce bus_get_instance_id() systemd/systemd@a9a8d2e
905304b - core: serialize API bus id and validate before deserializing bus track… systemd/systemd@1446e3c
e7c3e99 - core/manager: restore bus track deserialization cleanup in manager_rel… systemd/systemd@34f4b81
954b158 - shared/bus-util: add missing set.h include systemd/systemd@ca97d48

Tracker validation

Success

🟢 Tracker RHEL-73780 has set desired product: rhel-10.0
🟢 Tracker RHEL-73780 has set desired component: systemd
🟢 Tracker RHEL-73780 has been approved
🟢 Tracker RHEL-73780 has set severity


Pull Request validation

Failed

🔴 Review - Missing review from a member (1 required)

Success

🟢 CI - All checks have passed

@jamacku
Copy link
Member Author

jamacku commented Jan 17, 2025

/packit test

rpigott and others added 10 commits January 17, 2025 08:50
If we unexpectly disconnect from the bus, systemd would end up dropping
the list of subscribers, which breaks the ability of clients like logind
to monitor the state of units.

Stash the list of subscribers into the deserialized state in the event
of a disconnect so that when we recover we can renew the broken
subscriptions.

(cherry picked from commit 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98)

Resolves: RHEL-73780
Now that this field may get populated at runtime, the deserialized name
is misleading. Change the name to reflect its updated purpose.

(cherry picked from commit e1315a621ae26473fcc9cd0d6013836f5f498d40)

Resolves: RHEL-73780
(cherry picked from commit ab33edb05b7d4c90fb80f46aa6b951c505048798)

Resolves: RHEL-73780
(cherry picked from commit e3d37628aabff92e4b756e63ef0a6cd4569ce743)

Resolves: RHEL-73780
… and bus-get-properties, respectively

(cherry picked from commit 91080bc9733b5b2478bfc0ed58f6a7ae5da7e639)

Resolves: RHEL-73780
(cherry picked from commit 3f03d39ca3b2f25f521342f2b0e49f60c51246e1)

Resolves: RHEL-73780
(cherry picked from commit 38a2c2bf6a89def24007c0dac529c07da713abfb)

Resolves: RHEL-73780
Follow-up for 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98

While at it, turn the retval check for sd_bus_track_count_name()
into assertion, given we're working with already established tracks
(service_name_is_valid() should never yield false in this case).

Addresses systemd/systemd#35406 (comment)

(cherry picked from commit 33eeea4128f31df7ab4bd8866b582062d70114ae)

Resolves: RHEL-73780
(cherry picked from commit a7516260b32dd26fb61b1dd702b9bc718cd420f9)

Resolves: RHEL-73780
bus_init_api() now does this internally
(after 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98).

(cherry picked from commit af0e10354e567bfd0b9521376b2aad55f12a4e3d)

Resolves: RHEL-73780
YHNdnzj and others added 4 commits January 17, 2025 08:50
(cherry picked from commit a9a8d2e12fe01b928135895f00c5bca465b7d13b)

Resolves: RHEL-73780
(cherry picked from commit 1446e3c3921067e3a6228a3e172b5dfd95437136)

Resolves: RHEL-73780
…load()

There's zero explanation why it got (spuriously) removed in
8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98...

(cherry picked from commit 34f4b817f67b002eae7e2c09b19bf4b66c4791b6)

Resolves: RHEL-73780
```
In file included from ../src/shared/bus-get-properties.c:4:
../src/shared/bus-message-util.h:22:60: error: unknown type name ‘Set’
   22 | int bus_message_append_string_set(sd_bus_message *m, const Set *s);
      |                                                            ^~~
../src/shared/bus-get-properties.c: In function ‘bus_property_get_string_set’:
../src/shared/bus-get-properties.c:178:9: error: unknown type name ‘Set’
  178 |         Set **s = ASSERT_PTR(userdata);
      |         ^~~
```

follow-up to systemd/systemd@91080bc

(cherry picked from commit ca97d48bd425685d4ec20397812c3b1b006f5070)

Resolves: RHEL-73780
@jamacku jamacku force-pushed the RHEL-73780-stash-sub-list branch from 6d36a4c to 954b158 Compare January 17, 2025 07:50
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.

3 participants