fix --addr backward compatibility

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2015-05-26 17:48:54 -07:00
parent 7394be0704
commit ad6fac53db
3 changed files with 2 additions and 10 deletions

View File

@ -33,12 +33,12 @@ var (
Usage: "",
}
flJoinAdvertise = cli.StringFlag{
Name: "advertise",
Name: "advertise, addr",
Usage: "Address of the Docker Engine joining the cluster. Swarm managers MUST be able to reach Docker at this address.",
EnvVar: "SWARM_ADVERTISE",
}
flManageAdvertise = cli.StringFlag{
Name: "advertise",
Name: "advertise, addr",
Usage: "Address of the Swarm manager joining the cluster. Other swarm managers MUST be able to reach Swarm at this address.",
EnvVar: "SWARM_ADVERTISE",
}

View File

@ -21,10 +21,6 @@ func join(c *cli.Context) {
}
addr := c.String("advertise")
// Backward compatibility.
if addr == "" {
addr = c.String("addr")
}
if addr == "" {
log.Fatal("missing mandatory --advertise flag")
}

View File

@ -211,10 +211,6 @@ func manage(c *cli.Context) {
if c.Bool("leader-election") {
addr := c.String("advertise")
// Backward compatibility.
if addr == "" {
addr = c.String("addr")
}
if addr == "" {
log.Fatal("--advertise address must be provided when using --leader-election")
}