scaleway / scaleway-cli

Command Line Interface for Scaleway
https://www.scaleway.com/en/cli/
Apache License 2.0
888 stars 152 forks source link

Rename does not work? #299

Closed Govinda-Fichtner closed 8 years ago

Govinda-Fichtner commented 8 years ago

Tried to rename a scaleway server with the command line.

Got this error:

$ scw rename scw-f64870 cl-leader
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x10bfac]

goroutine 1 [running]:
github.com/scaleway/scaleway-cli/pkg/commands.RunRename(0x8a26e0, 0xc820030008, 0x8a21c0, 0xc820030010, 0x8a21c0, 0xc820030018, 0xc8200a7c00, 0x33, 0x33, 0xc82000a2a0, ...)
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/pkg/commands/rename.go:32 +0x2bc
github.com/scaleway/scaleway-cli/pkg/cli.runRename(0x75d680, 0xc82000a2a0, 0x2, 0x2, 0x0, 0x0)
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/pkg/cli/cmd_rename.go:36 +0x19b
github.com/scaleway/scaleway-cli/pkg/cli.Start(0xc82000a290, 0x3, 0x3, 0xc8200d9350, 0x0, 0x0, 0x0)
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/pkg/cli/main.go:127 +0xcf5
main.main()
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/cmd/scw/main.go:19 +0x8e

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/Cellar/go/1.5.3/libexec/src/runtime/asm_amd64.s:1721 +0x1

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/Cellar/go/1.5.3/libexec/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
    /usr/local/Cellar/go/1.5.3/libexec/src/os/signal/signal_unix.go:28 +0x37

goroutine 18 [IO wait]:
net.runtime_pollWait(0x8a3f48, 0x72, 0xc82000e1e0)
    /usr/local/Cellar/go/1.5.3/libexec/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc820124450, 0x72, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc820124450, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8201243f0, 0xc8204c4000, 0x1000, 0x1000, 0x0, 0x89e050, 0xc82000e1e0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc8200303a0, 0xc8204c4000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/net.go:172 +0xe4
crypto/tls.(*block).readFromUntil(0xc82012c1e0, 0x8a4008, 0xc8200303a0, 0x5, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/crypto/tls/conn.go:455 +0xcc
crypto/tls.(*Conn).readRecord(0xc8200a0dc0, 0x5d5f17, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/crypto/tls/conn.go:540 +0x2d1
crypto/tls.(*Conn).Read(0xc8200a0dc0, 0xc8201cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/crypto/tls/conn.go:901 +0x167
net/http.noteEOFReader.Read(0xd6c890, 0xc8200a0dc0, 0xc8200ac318, 0xc8201cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc8204ad5c0, 0xc8201cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    <autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc8203bdf20)
    /usr/local/Cellar/go/1.5.3/libexec/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc8203bdf20, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc8200ac2c0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:685 +0xc78

goroutine 19 [select]:
net/http.(*persistConn).writeLoop(0xc8200ac2c0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:686 +0xc9d
govindaf@Govindas-MBP ~/workspace/hypriot/flash/Darwin (master●)$ scw rename scw-f64870 cl-leader
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x10bfac]

goroutine 1 [running]:
github.com/scaleway/scaleway-cli/pkg/commands.RunRename(0x8a26e0, 0xc820030008, 0x8a21c0, 0xc820030010, 0x8a21c0, 0xc820030018, 0xc8200b3c00, 0x33, 0x33, 0xc82000a2a0, ...)
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/pkg/commands/rename.go:32 +0x2bc
github.com/scaleway/scaleway-cli/pkg/cli.runRename(0x75d680, 0xc82000a2a0, 0x2, 0x2, 0x0, 0x0)
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/pkg/cli/cmd_rename.go:36 +0x19b
github.com/scaleway/scaleway-cli/pkg/cli.Start(0xc82000a290, 0x3, 0x3, 0xc8200e5350, 0x0, 0x0, 0x0)
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/pkg/cli/main.go:127 +0xcf5
main.main()
    /private/tmp/scw20160129-67260-1dburi9/scaleway-cli-1.7.1/src/github.com/scaleway/scaleway-cli/cmd/scw/main.go:19 +0x8e

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/Cellar/go/1.5.3/libexec/src/runtime/asm_amd64.s:1721 +0x1

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/Cellar/go/1.5.3/libexec/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
    /usr/local/Cellar/go/1.5.3/libexec/src/os/signal/signal_unix.go:28 +0x37

goroutine 19 [IO wait]:
net.runtime_pollWait(0x8a4078, 0x72, 0xc82000e1e0)
    /usr/local/Cellar/go/1.5.3/libexec/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc820130450, 0x72, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc820130450, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8201303f0, 0xc8201cf000, 0x1000, 0x1000, 0x0, 0x89e050, 0xc82000e1e0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc820140000, 0xc8201cf000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/net.go:172 +0xe4
crypto/tls.(*block).readFromUntil(0xc82013e090, 0xd60000, 0xc820140000, 0x5, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/crypto/tls/conn.go:455 +0xcc
crypto/tls.(*Conn).readRecord(0xc820146000, 0x5d5f17, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/crypto/tls/conn.go:540 +0x2d1
crypto/tls.(*Conn).Read(0xc820146000, 0xc820239000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/crypto/tls/conn.go:901 +0x167
net/http.noteEOFReader.Read(0xd6c968, 0xc820146000, 0xc8200b8318, 0xc820239000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc8204ad680, 0xc820239000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    <autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc8201cc000)
    /usr/local/Cellar/go/1.5.3/libexec/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc8201cc000, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.3/libexec/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc8200b82c0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:685 +0xc78

goroutine 20 [select]:
net/http.(*persistConn).writeLoop(0xc8200b82c0)
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.3/libexec/src/net/http/transport.go:686 +0xc9d
QuentinPerez commented 8 years ago

Hi @Govinda-Fichtner thank for your issue 😃, The bug has been fixed here https://github.com/scaleway/scaleway-cli/commit/e84c6b68d730727e8e9a6c0bb74b88c04ffad5c9 but not released

moul commented 8 years ago

Note that the trace appears after the effective rename :)

moul commented 8 years ago

Latest release 1.8.0 was shipped with the fix