Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Error marshaling configuration from the website #3916

Closed
ogham opened this issue Apr 7, 2018 · 2 comments
Closed

Error marshaling configuration from the website #3916

ogham opened this issue Apr 7, 2018 · 2 comments

Comments

@ogham
Copy link

ogham commented Apr 7, 2018

Environment

rkt Version: 1.29.0
appc Version: 0.8.11
Go Version: go1.8.3
Go OS/Arch: linux/amd64
Features: -TPM +SDJOURNAL
--
Linux 4.4.0-116-generic x86_64
--
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
--
systemd 229
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

What did you do?

I ran rkt config with a sample configuration file I copied from the website.

What did you expect to see?

A description of my config from rkt config.

What did you see instead?

A stacktrace:

vagrant@vm:/vagrant/jobs$ sudo cat /usr/lib/rkt/auth.d/s3.json
{
  "rktKind": "auth",
  "rktVersion": "v1",
  "domains": ["my-s3-bucket.s3.amazonaws.com"],
  "type": "aws",
  "credentials": {
    "accessKeyID": "foo",
    "secretAccessKey": "bar",
    "awsRegion": "us-east-1"
  }
}
vagrant@vm:/vagrant/jobs$ sudo rkt config
config: error marshaling configuration: json: error calling MarshalJSON for type *config.Config: unknown headerer type
panic: error marshaling configuration: json: error calling MarshalJSON for type *config.Config: unknown headerer type

goroutine 1 [running, locked to thread]:
log.(*Logger).Panic(0xc4203c2aa0, 0xc42026bc20, 0x1, 0x1)
  /usr/lib/go-1.8/src/log/log.go:208 +0xbe
github.com/rkt/rkt/pkg/log.(*Logger).PanicE(0xc4203da6d0, 0xd10aa8, 0x1e, 0x12c7180, 0xc4203ada80)
  /opt/build-rkt/gopath/src/github.com/rkt/rkt/pkg/log/log.go:133 +0xdf
main.runConfig(0x12b9ac0, 0x1341aa8, 0x0, 0x0, 0x0)
  /opt/build-rkt/gopath/src/github.com/rkt/rkt/rkt/config.go:53 +0x1c1
main.runWrapper.func1(0x12b9ac0, 0x1341aa8, 0x0, 0x0)
  /opt/build-rkt/gopath/src/github.com/rkt/rkt/rkt/rkt.go:186 +0xa2
github.com/rkt/rkt/vendor/github.com/spf13/cobra.(*Command).execute(0x12b9ac0, 0x1341aa8, 0x0, 0x0, 0x12b9ac0, 0x1341aa8)
  /opt/build-rkt/gopath/src/github.com/rkt/rkt/vendor/github.com/spf13/cobra/command.go:565 +0x203
github.com/rkt/rkt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x12b7ec0, 0xcfa67d, 0x0, 0x0)
  /opt/build-rkt/gopath/src/github.com/rkt/rkt/vendor/github.com/spf13/cobra/command.go:651 +0x339
github.com/rkt/rkt/vendor/github.com/spf13/cobra.(*Command).Execute(0x12b7ec0, 0xc4200001a0, 0xc4200001a0)
  /opt/build-rkt/gopath/src/github.com/rkt/rkt/vendor/github.com/spf13/cobra/command.go:610 +0x2b
main.main()
  /opt/build-rkt/gopath/src/github.com/rkt/rkt/rkt/main.go:32 +0x93
@euank
Copy link
Member

euank commented Apr 7, 2018

This looks like it's fixed by #3910, which isn't included in any release yet.

You're welcome to double check that fixes it, but based on that trace and the changes in the PR, it seems quite likely it will.

@ogham
Copy link
Author

ogham commented Apr 16, 2018

I just tried out 1.30.0 and rkt config now works!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants