Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit fa5f6ee

Browse files
author
Derek Gonyeo
authored
Merge pull request #452 from dgonyeo/master
*: remove locksmith "best effort" strategy
2 parents fb2cd66 + c36bcb8 commit fa5f6ee

File tree

5 files changed

+4
-22
lines changed

5 files changed

+4
-22
lines changed

Documentation/cloud-config.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,9 @@ The `coreos.update.*` parameters manipulate settings related to how CoreOS insta
253253
These fields will be written out to and replace `/etc/coreos/update.conf`. If only one of the parameters is given it will only overwrite the given field.
254254
The `reboot-strategy` parameter also affects the behaviour of [locksmith](https://github.com/coreos/locksmith).
255255

256-
- **reboot-strategy**: One of "reboot", "etcd-lock", "best-effort" or "off" for controlling when reboots are issued after an update is performed.
256+
- **reboot-strategy**: One of "reboot", "etcd-lock", or "off" for controlling when reboots are issued after an update is performed.
257257
- _reboot_: Reboot immediately after an update is applied.
258258
- _etcd-lock_: Reboot after first taking a distributed lock in etcd, this guarantees that only one host will reboot concurrently and that the cluster will remain available during the update.
259-
- _best-effort_ - If etcd is running, "etcd-lock", otherwise simply "reboot".
260259
- _off_ - Disable rebooting after updates are applied (not recommended).
261260
- **server**: The location of the [CoreUpdate][coreupdate] server which will be queried for updates. Also known as the [omaha][omaha-docs] server endpoint.
262261
- **group**: signifies the channel which should be used for automatic updates. This value defaults to the version of the image initially downloaded. (one of "master", "alpha", "beta", "stable")

config/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package config
1616

1717
type Update struct {
18-
RebootStrategy string `yaml:"reboot_strategy" env:"REBOOT_STRATEGY" valid:"^(best-effort|etcd-lock|reboot|off)$"`
18+
RebootStrategy string `yaml:"reboot_strategy" env:"REBOOT_STRATEGY" valid:"^(etcd-lock|reboot|off)$"`
1919
Group string `yaml:"group" env:"GROUP"`
2020
Server string `yaml:"server" env:"SERVER"`
2121
}

config/update_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func TestRebootStrategyValid(t *testing.T) {
2626

2727
isValid bool
2828
}{
29-
{value: "best-effort", isValid: true},
3029
{value: "etcd-lock", isValid: true},
3130
{value: "reboot", isValid: true},
3231
{value: "off", isValid: true},

pkg/http_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ coreos:
112112
home-url: https://github.com/coreos/coreos-cloudinit
113113
bug-report-url: https://github.com/coreos/coreos-cloudinit
114114
update:
115-
reboot-strategy: best-effort
115+
reboot-strategy: etcd-lock
116116
`
117117

118118
client := NewHttpClient()

system/update_test.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ func TestUpdateUnits(t *testing.T) {
4545
Command: "restart",
4646
}}},
4747
},
48-
{
49-
config: config.Update{RebootStrategy: "best-effort"},
50-
units: []Unit{{config.Unit{
51-
Name: "locksmithd.service",
52-
Command: "restart",
53-
Runtime: true,
54-
}}},
55-
},
5648
{
5749
config: config.Update{RebootStrategy: "etcd-lock"},
5850
units: []Unit{{config.Unit{
@@ -98,7 +90,7 @@ func TestUpdateFile(t *testing.T) {
9890
},
9991
{
10092
config: config.Update{RebootStrategy: "wizzlewazzle"},
101-
err: &config.ErrorValid{Value: "wizzlewazzle", Field: "RebootStrategy", Valid: "^(best-effort|etcd-lock|reboot|off)$"},
93+
err: &config.ErrorValid{Value: "wizzlewazzle", Field: "RebootStrategy", Valid: "^(etcd-lock|reboot|off)$"},
10294
},
10395
{
10496
config: config.Update{Group: "master", Server: "http://foo.com"},
@@ -108,14 +100,6 @@ func TestUpdateFile(t *testing.T) {
108100
RawFilePermissions: "0644",
109101
}},
110102
},
111-
{
112-
config: config.Update{RebootStrategy: "best-effort"},
113-
file: &File{config.File{
114-
Content: "REBOOT_STRATEGY=best-effort\n",
115-
Path: "etc/coreos/update.conf",
116-
RawFilePermissions: "0644",
117-
}},
118-
},
119103
{
120104
config: config.Update{RebootStrategy: "etcd-lock"},
121105
file: &File{config.File{

0 commit comments

Comments
 (0)