AutoYaST not disabling services

Hello there,

I’ve setup my AutoYaST profile with the following section:

  <services-manager>
    <default_target>graphical</default_target>
    <services>
      <disable config:type="list">
        <service>lvm2-lvmetad</service>
        <service>avahi-daemon</service>
        <service>dbus-org.freedesktop.Avahi</service>
        <service>postfix</service>
      </disable>
    </services>
  </services-manager>

Yet the services are still active once installation is complete. Is this a bug? Or is there something wrong with my profile?

Have you tried setting default target to multi-user instead (like in the official documentation)?
https://doc.opensuse.org/projects/autoyast/#CreateProfile.Services

And, just verifying that the result isn’t that the services are running…
Even if a service is disabled, it only means that the service won’t auto-start, but if the service is a dependency for something else, that something else can still start up the service.

Lastly, if the AutoYaST configuration just won’t work, I’d expect that simply running “systemctl disable” commands later, for instance as a “cleanup script” shouldn’t be a big deal.

TSU

Solved. tl;dr: badly configured rules.xml

So it turns out the (surprisingly confusing) merging done by the rules.xml file was the culprit. The services weren’t disabled because the relevant configuration didn’t even make it to the final profile.

To anyone getting here from a Google search or similar:

  1. RTFM. They really aren’t kidding when they say “This merging process …] behaves different than one would expect.”: https://doc.opensuse.org/projects/autoyast/#merging
  2. You absolutely need
    to use the dont_merge tag! Even for trivial things like packages, services etc. Otherwise they *will *get overwritten. 1. The final merged profile is saved in /tmp/profile/autoinst.xml before the installation is carried out. Do check it to see if everything looks OK. If not, then your rules.xml is probably badly configured.

Seriously though, that documentation section could totally use an example with some simpler objects like packages, patterns, services etc. in addition to that one with the partitions…