Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. 2️⃣ Here's the 2nd post highlighting key new features of the upcoming v261 release of systemd.

2️⃣ Here's the 2nd post highlighting key new features of the upcoming v261 release of systemd.

Scheduled Pinned Locked Moved Uncategorized
systemd261systemd
19 Posts 6 Posters 63 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • pid_eins@mastodon.socialP This user is from outside of this forum
    pid_eins@mastodon.socialP This user is from outside of this forum
    pid_eins@mastodon.social
    wrote last edited by
    #1

    2️⃣ Here's the 2nd post highlighting key new features of the upcoming v261 release of systemd. #systemd261 #systemd

    When you care for a more than a single system, it is often advisable to roll out new stuff in a staged fashion: first 1% of your fleet should get it, and only after the results are in and all is good, you up it to 10%, and then to 25% and finally to 100% (or in other steps like this).

    With v261, systemd is going to help you with this to some degree:

    pid_eins@mastodon.socialP raito@nixos.parisR 2 Replies Last reply
    0
    • pid_eins@mastodon.socialP pid_eins@mastodon.social

      2️⃣ Here's the 2nd post highlighting key new features of the upcoming v261 release of systemd. #systemd261 #systemd

      When you care for a more than a single system, it is often advisable to roll out new stuff in a staged fashion: first 1% of your fleet should get it, and only after the results are in and all is good, you up it to 10%, and then to 25% and finally to 100% (or in other steps like this).

      With v261, systemd is going to help you with this to some degree:

      pid_eins@mastodon.socialP This user is from outside of this forum
      pid_eins@mastodon.socialP This user is from outside of this forum
      pid_eins@mastodon.social
      wrote last edited by
      #2

      There's a new setting ConditionFraction= which allows to condition a unit to only run on a certain, randomly selected (but deterministic) subset of your fleet.

      You can use it like this:

      [Unit]
      …
      ConditionFraction=15%
      …

      pid_eins@mastodon.socialP purpleidea@mastodon.socialP 2 Replies Last reply
      0
      • pid_eins@mastodon.socialP pid_eins@mastodon.social

        There's a new setting ConditionFraction= which allows to condition a unit to only run on a certain, randomly selected (but deterministic) subset of your fleet.

        You can use it like this:

        [Unit]
        …
        ConditionFraction=15%
        …

        pid_eins@mastodon.socialP This user is from outside of this forum
        pid_eins@mastodon.socialP This user is from outside of this forum
        pid_eins@mastodon.social
        wrote last edited by
        #3

        With that simple setting you just declared that the service shall be run on only ~15% of systems and be skipped on ~85% of them.

        How does this work?

        Basically, we derive an 32bit integer value from the machine ID (i.e. /etc/machine-id) by hashing, and if that integer is below the specified percentage of 2^32, the condition holds, and otherwise it doesn't.

        You can also invert the check, so that you can condition some stuff to run on the in-group, and something else on the out-group.

        astro@c3d2.socialA pid_eins@mastodon.socialP 2 Replies Last reply
        0
        • pid_eins@mastodon.socialP pid_eins@mastodon.social

          With that simple setting you just declared that the service shall be run on only ~15% of systems and be skipped on ~85% of them.

          How does this work?

          Basically, we derive an 32bit integer value from the machine ID (i.e. /etc/machine-id) by hashing, and if that integer is below the specified percentage of 2^32, the condition holds, and otherwise it doesn't.

          You can also invert the check, so that you can condition some stuff to run on the in-group, and something else on the out-group.

          astro@c3d2.socialA This user is from outside of this forum
          astro@c3d2.socialA This user is from outside of this forum
          astro@c3d2.social
          wrote last edited by
          #4

          @pid_eins
          This will be an essential feature for Works On My Machine certification!

          1 Reply Last reply
          0
          • pid_eins@mastodon.socialP pid_eins@mastodon.social

            With that simple setting you just declared that the service shall be run on only ~15% of systems and be skipped on ~85% of them.

            How does this work?

            Basically, we derive an 32bit integer value from the machine ID (i.e. /etc/machine-id) by hashing, and if that integer is below the specified percentage of 2^32, the condition holds, and otherwise it doesn't.

            You can also invert the check, so that you can condition some stuff to run on the in-group, and something else on the out-group.

            pid_eins@mastodon.socialP This user is from outside of this forum
            pid_eins@mastodon.socialP This user is from outside of this forum
            pid_eins@mastodon.social
            wrote last edited by
            #5

            As defined above the only input for the hash function is the machine ID, which would mean that for any unit you condition like this, it would be the very same subset of systems that would run it, and the same subset that wouldn't, regardless of the unit.

            This typically is not what you want. Hence, you can also specify "ConditionFraction=foo 15%" where "foo" is an arbitrary string called the "tag". When specified it's mixed into the hash, and thus selects a random, yet deterministic subset…

            pid_eins@mastodon.socialP 1 Reply Last reply
            0
            • pid_eins@mastodon.socialP pid_eins@mastodon.social

              As defined above the only input for the hash function is the machine ID, which would mean that for any unit you condition like this, it would be the very same subset of systems that would run it, and the same subset that wouldn't, regardless of the unit.

              This typically is not what you want. Hence, you can also specify "ConditionFraction=foo 15%" where "foo" is an arbitrary string called the "tag". When specified it's mixed into the hash, and thus selects a random, yet deterministic subset…

              pid_eins@mastodon.socialP This user is from outside of this forum
              pid_eins@mastodon.socialP This user is from outside of this forum
              pid_eins@mastodon.social
              wrote last edited by
              #6

              …of systems that are selected. If multiple units use the same tag they'd be conditioned on the same subset of systems, and if they use a different tag the subset will be selected differently.

              synlogic4242@social.vivaldi.netS 1 Reply Last reply
              0
              • pid_eins@mastodon.socialP pid_eins@mastodon.social

                There's a new setting ConditionFraction= which allows to condition a unit to only run on a certain, randomly selected (but deterministic) subset of your fleet.

                You can use it like this:

                [Unit]
                …
                ConditionFraction=15%
                …

                purpleidea@mastodon.socialP This user is from outside of this forum
                purpleidea@mastodon.socialP This user is from outside of this forum
                purpleidea@mastodon.social
                wrote last edited by
                #7

                @pid_eins This is a very neat idea but I don't think it belongs in systemd. Tools like https://github.com/purpleidea/mgmt/ are where this belongs.

                This design implies a static representation of the world, when in reality we might care about doing this in 15% of machines that are in a certain zone or with a certain version or something else.

                So you need automation tools to deploy to that subset anyways, so the same tools can choose which % get the workload.

                pid_eins@mastodon.socialP 1 Reply Last reply
                0
                • pid_eins@mastodon.socialP pid_eins@mastodon.social

                  …of systems that are selected. If multiple units use the same tag they'd be conditioned on the same subset of systems, and if they use a different tag the subset will be selected differently.

                  synlogic4242@social.vivaldi.netS This user is from outside of this forum
                  synlogic4242@social.vivaldi.netS This user is from outside of this forum
                  synlogic4242@social.vivaldi.net
                  wrote last edited by
                  #8

                  @pid_eins neat feature. thank you for your work, sir

                  1 Reply Last reply
                  0
                  • purpleidea@mastodon.socialP purpleidea@mastodon.social

                    @pid_eins This is a very neat idea but I don't think it belongs in systemd. Tools like https://github.com/purpleidea/mgmt/ are where this belongs.

                    This design implies a static representation of the world, when in reality we might care about doing this in 15% of machines that are in a certain zone or with a certain version or something else.

                    So you need automation tools to deploy to that subset anyways, so the same tools can choose which % get the workload.

                    pid_eins@mastodon.socialP This user is from outside of this forum
                    pid_eins@mastodon.socialP This user is from outside of this forum
                    pid_eins@mastodon.social
                    wrote last edited by
                    #9

                    @purpleidea Yeah, well, that's just like, your opinion, man.

                    You can have a multitude of conditions in the same unit file, to further restrict things. And there's another condition type we added in this release that might fit will into the concept you describe, but that's for later.

                    purpleidea@mastodon.socialP 1 Reply Last reply
                    0
                    • pid_eins@mastodon.socialP pid_eins@mastodon.social

                      @purpleidea Yeah, well, that's just like, your opinion, man.

                      You can have a multitude of conditions in the same unit file, to further restrict things. And there's another condition type we added in this release that might fit will into the concept you describe, but that's for later.

                      purpleidea@mastodon.socialP This user is from outside of this forum
                      purpleidea@mastodon.socialP This user is from outside of this forum
                      purpleidea@mastodon.social
                      wrote last edited by
                      #10

                      @pid_eins Well put it this way, what tooling would deploy the `ConditionFraction=` line?

                      Why wouldn't that tooling have the ability to choose which hosts?

                      I don't mind having this feature in, but I'm struggling to see the value. Like it's great to have a ladder, but if everything is already at eye level, how useful is it really?

                      purpleidea@mastodon.socialP pid_eins@mastodon.socialP tzz@infosec.exchangeT 3 Replies Last reply
                      0
                      • purpleidea@mastodon.socialP purpleidea@mastodon.social

                        @pid_eins Well put it this way, what tooling would deploy the `ConditionFraction=` line?

                        Why wouldn't that tooling have the ability to choose which hosts?

                        I don't mind having this feature in, but I'm struggling to see the value. Like it's great to have a ladder, but if everything is already at eye level, how useful is it really?

                        purpleidea@mastodon.socialP This user is from outside of this forum
                        purpleidea@mastodon.socialP This user is from outside of this forum
                        purpleidea@mastodon.social
                        wrote last edited by
                        #11

                        @pid_eins As an aside, I love the machine-id deterministic hashing... I think we should add the machine-id as a built in value users can query, and copy the hash function to be able to model the same distribution! I will eventually UTSL unless you have an API we can query directly.

                        pid_eins@mastodon.socialP 1 Reply Last reply
                        0
                        • pid_eins@mastodon.socialP pid_eins@mastodon.social

                          2️⃣ Here's the 2nd post highlighting key new features of the upcoming v261 release of systemd. #systemd261 #systemd

                          When you care for a more than a single system, it is often advisable to roll out new stuff in a staged fashion: first 1% of your fleet should get it, and only after the results are in and all is good, you up it to 10%, and then to 25% and finally to 100% (or in other steps like this).

                          With v261, systemd is going to help you with this to some degree:

                          raito@nixos.parisR This user is from outside of this forum
                          raito@nixos.parisR This user is from outside of this forum
                          raito@nixos.paris
                          wrote last edited by
                          #12

                          @pid_eins very nice! I assume there's a way to determine via DBus or Varlink if the randomized condition was true or not on a given unit file so that rollout agents can retrieve it?

                          pid_eins@mastodon.socialP 1 Reply Last reply
                          0
                          • pid_eins@mastodon.socialP This user is from outside of this forum
                            pid_eins@mastodon.socialP This user is from outside of this forum
                            pid_eins@mastodon.social
                            wrote last edited by
                            #13

                            @jamesh @purpleidea it's SHA256, not SHA1. It's 2026 after all

                            1 Reply Last reply
                            0
                            • purpleidea@mastodon.socialP purpleidea@mastodon.social

                              @pid_eins As an aside, I love the machine-id deterministic hashing... I think we should add the machine-id as a built in value users can query, and copy the hash function to be able to model the same distribution! I will eventually UTSL unless you have an API we can query directly.

                              pid_eins@mastodon.socialP This user is from outside of this forum
                              pid_eins@mastodon.socialP This user is from outside of this forum
                              pid_eins@mastodon.social
                              wrote last edited by
                              #14

                              @purpleidea we have no API for this, but it's trivial to reimplement. And this stuff is supposed to be deterministic and reproducible, hence I guess we really should try to keep it stable so that it doesn't lose it's reliable properties if you mix different systemd versions in the same datacenter. Hence I guess you can consider the algorithm the stable API here.

                              1 Reply Last reply
                              0
                              • purpleidea@mastodon.socialP purpleidea@mastodon.social

                                @pid_eins Well put it this way, what tooling would deploy the `ConditionFraction=` line?

                                Why wouldn't that tooling have the ability to choose which hosts?

                                I don't mind having this feature in, but I'm struggling to see the value. Like it's great to have a ladder, but if everything is already at eye level, how useful is it really?

                                pid_eins@mastodon.socialP This user is from outside of this forum
                                pid_eins@mastodon.socialP This user is from outside of this forum
                                pid_eins@mastodon.social
                                wrote last edited by
                                #15

                                @purpleidea well, people can push out unit files with any tool they like, it's really up to users.

                                The great thing about this is that it just works, i.e that there's no scalability problem. If you centrally determine a list of hosts to run something on, then you always have that: the algorithm needs to pick hosts, and compile things in a massive list, which could be quite large for a datacenter.

                                Also, you are assuming that there even *is* a central node that could do such scheduling. But…

                                pid_eins@mastodon.socialP 1 Reply Last reply
                                0
                                • pid_eins@mastodon.socialP pid_eins@mastodon.social

                                  @purpleidea well, people can push out unit files with any tool they like, it's really up to users.

                                  The great thing about this is that it just works, i.e that there's no scalability problem. If you centrally determine a list of hosts to run something on, then you always have that: the algorithm needs to pick hosts, and compile things in a massive list, which could be quite large for a datacenter.

                                  Also, you are assuming that there even *is* a central node that could do such scheduling. But…

                                  pid_eins@mastodon.socialP This user is from outside of this forum
                                  pid_eins@mastodon.socialP This user is from outside of this forum
                                  pid_eins@mastodon.social
                                  wrote last edited by
                                  #16

                                  @purpleidea …that's not a given: consider an image based desktop OS with a strong feedback path, which wants to deploy some tooling/metrics collection in a staged fashion. They typically don't have a list of their installations, but they still want to deploy piecemeal.

                                  Hence, I am pretty sure this is very useful, and in many way systematically better than a centrally scheduled approach.

                                  Also, systemd already had ConditionHost= (which can condition on /etc/machine-id) before. This feature…

                                  pid_eins@mastodon.socialP 1 Reply Last reply
                                  0
                                  • pid_eins@mastodon.socialP pid_eins@mastodon.social

                                    @purpleidea …that's not a given: consider an image based desktop OS with a strong feedback path, which wants to deploy some tooling/metrics collection in a staged fashion. They typically don't have a list of their installations, but they still want to deploy piecemeal.

                                    Hence, I am pretty sure this is very useful, and in many way systematically better than a centrally scheduled approach.

                                    Also, systemd already had ConditionHost= (which can condition on /etc/machine-id) before. This feature…

                                    pid_eins@mastodon.socialP This user is from outside of this forum
                                    pid_eins@mastodon.socialP This user is from outside of this forum
                                    pid_eins@mastodon.social
                                    wrote last edited by
                                    #17

                                    @purpleidea … is now just adds a tiny bit of code on top which instead of doing memcmp() of the machine-id now calculates `HMAC(machine-id, tag) <= X`. Which is frankly a triviality.

                                    1 Reply Last reply
                                    0
                                    • raito@nixos.parisR raito@nixos.paris

                                      @pid_eins very nice! I assume there's a way to determine via DBus or Varlink if the randomized condition was true or not on a given unit file so that rollout agents can retrieve it?

                                      pid_eins@mastodon.socialP This user is from outside of this forum
                                      pid_eins@mastodon.socialP This user is from outside of this forum
                                      pid_eins@mastodon.social
                                      wrote last edited by
                                      #18

                                      @raito yeah, you can query the result of conditions via D-Bus and "systemctl status"

                                      1 Reply Last reply
                                      0
                                      • purpleidea@mastodon.socialP purpleidea@mastodon.social

                                        @pid_eins Well put it this way, what tooling would deploy the `ConditionFraction=` line?

                                        Why wouldn't that tooling have the ability to choose which hosts?

                                        I don't mind having this feature in, but I'm struggling to see the value. Like it's great to have a ladder, but if everything is already at eye level, how useful is it really?

                                        tzz@infosec.exchangeT This user is from outside of this forum
                                        tzz@infosec.exchangeT This user is from outside of this forum
                                        tzz@infosec.exchange
                                        wrote last edited by
                                        #19

                                        @purpleidea @pid_eins I think there’s room for both #configmanagememt driven sharding of populations and autonomous local stable sharding. The latter is useful when you want the local state to be persistent and stable even when #configmanagememt stops working or is not used in the first place.

                                        1 Reply Last reply
                                        1
                                        0
                                        • R relay@relay.infosec.exchange shared this topic
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • World
                                        • Users
                                        • Groups