drop-ins name has any naming-convention in cloud-config.yaml?

32 views
Skip to first unread message

Jin Pyo Jun

unread,
Apr 25, 2017, 10:03:20 PM4/25/17
to CoreOS User
hello. i'm coreos nb.

to customize DOCKER_OPTS value,
set cloud-config.yaml to run coreos-cloudinit --from-file=.

in https://coreos.com/os/docs/latest/cloud-config-examples.html,
...
      drop-ins:
        - name: 10-debug.conf
...
i found that every drop-ins name has '<number>-<name>.conf' naming-convension.

why that convension used?
can i use just as 'my_temp_opts.conf' better than '10-debug.conf'?

Rob Szumski

unread,
Apr 26, 2017, 12:11:21 PM4/26/17
to Jin Pyo Jun, CoreOS User
This is called “lexical ordering” and is basically a way to control the order of how all of the files are flattened together into the final configuration that your service is started with. Think in terms of 10 starts before 20, etc.

You can always view the contents and ordering with `systemctl cat foo.service`, which is a great way to make sure your etcd configuration turned out how you wanted it to.

Here’s more from the systemd manpage:

       All link files are collectively sorted and
       processed in lexical order, regardless of the directories in which they
       live. However, files with identical filenames replace each other. Files
       in /etc have the highest priority, files in /run take precedence over
       files with the same name in /lib. This can be used to override a
       system-supplied link file with a local file if needed. As a special
       case, an empty file (file size 0) or symlink with the same name
       pointing to /dev/null disables the configuration file entirely (it is
       "masked”).

 - Rob

--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jin Pyo Jun

unread,
Apr 26, 2017, 7:59:59 PM4/26/17
to CoreOS User, green...@gmail.com
that's what i want.
it's about systemd configuration, and follow it's naming rule.
thank you.

2017년 4월 27일 목요일 오전 1시 11분 21초 UTC+9, Rob Szumski 님의 말:
Reply all
Reply to author
Forward
0 new messages