sighupio / furyagent

Apache License 2.0
9 stars 2 forks source link

local storage fails to configure master nodes #15

Closed angelbarrera92 closed 4 years ago

angelbarrera92 commented 4 years ago

Hi team!

We have an issue with the configure command in this project. I were testing the binary locally, so i used local storage to create and configure certificates.

In order to reproduce the issue:

$ mkdir -p /tmp/furyagent-play/s3
$ mkdir -p /tmp/furyagent-play/master-node/etc/kubernetes

/tmp/furyagent-play/furyagent.yml content:

storage:
  provider: local
  path: /tmp/furyagent-play/s3
clusterComponent:
  nodeName: localhost
  master:
    certDir: /tmp/furyagent-play/master-node/etc/kubernetes/certs

Then

$ cd /tmp/furyagent-play
$ furyagent init master
2020-03-05 13:48:22.395829 I | master.go:90: Writing files to pki/master
$ ls -lrt s3/pki/master/
total 48
-rw-r--r--  1 angelbarrerasanchez-sighup  wheel  1119  5 mar 13:48 ca.crt
-rw-r--r--  1 angelbarrerasanchez-sighup  wheel  1675  5 mar 13:48 ca.key
-rw-r--r--  1 angelbarrerasanchez-sighup  wheel  1119  5 mar 13:48 sa.pub
-rw-r--r--  1 angelbarrerasanchez-sighup  wheel  1679  5 mar 13:48 sa.key
-rw-r--r--  1 angelbarrerasanchez-sighup  wheel  1119  5 mar 13:48 front-proxy-ca.crt
-rw-r--r--  1 angelbarrerasanchez-sighup  wheel  1675  5 mar 13:48 front-proxy-ca.key

And the error:

$ furyagent configure master --overwrite=true
2020-03-05 13:50:38.289922 I | storage.go:299: no %s found in bucket pki/master/ca.crt
2020-03-05 13:50:38.289981 I | configure.go:45: Item pki/master/ca.crt not found

We have to ensure it only happens with local provider.

Feel free to contact me if you need anything else!

angelbarrera92 commented 4 years ago

16 fixed this issue. Thanks @phisco