Skip to content

Commit cfe4e5e

Browse files
committed
add debugging notes, fix create-private-ip
1 parent 3a24934 commit cfe4e5e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ Successfully removed linode
7474
| `linode-stackscript-data` | `LINODE_STACKSCRIPT_DATA` | None | A JSON string specifying data that is passed (via UDF) to the selected StackScript.
7575
| `linode-create-private-ip` | `LINODE_CREATE_PRIVATE_IP` | None | A flag specifying to create private IP for the Linode instance.
7676

77+
## Debugging
78+
79+
Detailed run output will be emitted when using the LinodeGo `LINODE_DEBUG=1` option along with the `docker-machine` `--debug` option.
80+
81+
```bash
82+
LINODE_DEBUG=1 docker-machine --debug create -d linode --linode-token=$LINODE_TOKEN --linode-root-pass=$ROOT_PASS machinename
83+
```
84+
7785
## Discussion / Help
7886

7987
Join us at [#linodego](https://gophers.slack.com/messages/CAG93EB2S) on the [gophers slack](https://gophers.slack.com)

pkg/drivers/linode/linode.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ func (d *Driver) Create() error {
379379
for _, address := range linode.IPv4 {
380380
if private := privateIP(*address); !private {
381381
d.IPAddress = address.String()
382-
break
383382
} else if d.CreatePrivateIP {
384383
d.PrivateIPAddress = address.String()
385384
}
@@ -393,7 +392,7 @@ func (d *Driver) Create() error {
393392
return errors.New("Linode Private IP Address is not found")
394393
}
395394

396-
log.Debugf("Created Linode Instance %s (%d), IP address %s, Private IP address %s",
395+
log.Debugf("Created Linode Instance %s (%d), IP address %q, Private IP address %q",
397396
d.InstanceLabel,
398397
d.InstanceID,
399398
d.IPAddress,

0 commit comments

Comments
 (0)