This PR refactors all of the etcd units in master.project's ignition file (composed during building) so that each unit is tied into a single etcd.target unit. Prior to this, the OnFailure= requisite was used when booting up in order to determine whether to start either the etcd-master.service or etcd-member.service unit. While provisioning master.project, the starting and stopping of the etcd service required referencing the etcd-schema.service unit directly.
As a result of this PR, when the etcd.target unit is started (or stopped), the correct service to startup is determined by the requisites of the other units. When /etc/bootstrap-environment does not exist (hasn't been created yet), the etcd-schema.service unit is started so that the etcd schema can be seeded with the initial project state.
Once both the /etc/bootstrap-environment and the /etc/network-environment files have been created, then the etcd-cluster.service unit is started. This unit will try and fetch the member list from the bootstrap server and once successful will proceed to start the etcd-member.service unit. If the bootstrap server is unavailable, the etcd.target unit will simply fall back to starting the etcd-master.service unit.
This PR refactors all of the etcd units in master.project's ignition file (composed during building) so that each unit is tied into a single
etcd.target
unit. Prior to this, theOnFailure=
requisite was used when booting up in order to determine whether to start either theetcd-master.service
oretcd-member.service
unit. While provisioning master.project, the starting and stopping of the etcd service required referencing theetcd-schema.service
unit directly.As a result of this PR, when the
etcd.target
unit is started (or stopped), the correct service to startup is determined by the requisites of the other units. When/etc/bootstrap-environment
does not exist (hasn't been created yet), theetcd-schema.service
unit is started so that the etcd schema can be seeded with the initial project state.Once both the
/etc/bootstrap-environment
and the/etc/network-environment
files have been created, then theetcd-cluster.service
unit is started. This unit will try and fetch the member list from the bootstrap server and once successful will proceed to start theetcd-member.service
unit. If the bootstrap server is unavailable, theetcd.target
unit will simply fall back to starting theetcd-master.service
unit.