Skip to content

Commit

Permalink
add debugging notes, fix create-private-ip
Browse files Browse the repository at this point in the history
  • Loading branch information
displague committed Dec 18, 2018
1 parent 3a24934 commit cfe4e5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ Successfully removed linode
| `linode-stackscript-data` | `LINODE_STACKSCRIPT_DATA` | None | A JSON string specifying data that is passed (via UDF) to the selected StackScript.
| `linode-create-private-ip` | `LINODE_CREATE_PRIVATE_IP` | None | A flag specifying to create private IP for the Linode instance.

## Debugging

Detailed run output will be emitted when using the LinodeGo `LINODE_DEBUG=1` option along with the `docker-machine` `--debug` option.

```bash
LINODE_DEBUG=1 docker-machine --debug create -d linode --linode-token=$LINODE_TOKEN --linode-root-pass=$ROOT_PASS machinename
```

## Discussion / Help

Join us at [#linodego](https://gophers.slack.com/messages/CAG93EB2S) on the [gophers slack](https://gophers.slack.com)
Expand Down
3 changes: 1 addition & 2 deletions pkg/drivers/linode/linode.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ func (d *Driver) Create() error {
for _, address := range linode.IPv4 {
if private := privateIP(*address); !private {
d.IPAddress = address.String()
break
} else if d.CreatePrivateIP {
d.PrivateIPAddress = address.String()
}
Expand All @@ -393,7 +392,7 @@ func (d *Driver) Create() error {
return errors.New("Linode Private IP Address is not found")
}

log.Debugf("Created Linode Instance %s (%d), IP address %s, Private IP address %s",
log.Debugf("Created Linode Instance %s (%d), IP address %q, Private IP address %q",
d.InstanceLabel,
d.InstanceID,
d.IPAddress,
Expand Down

0 comments on commit cfe4e5e

Please sign in to comment.