Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't initialize OpenStack storage driver in CoreOS #246

Closed
scotthz opened this issue Jan 6, 2016 · 10 comments
Closed

can't initialize OpenStack storage driver in CoreOS #246

scotthz opened this issue Jan 6, 2016 · 10 comments

Comments

@scotthz
Copy link

scotthz commented Jan 6, 2016

When initializing the OpenStack storage driver, REX-Ray tries to execute /usr/sbin/dmidecode, which is not available in CoreOS. As a result,

DEBU[0000] error initializing driver                     driverName=Openstack error.provider=Openstack 
error.cmd.Path="/usr/sbin/dmidecode" error.cmd.Args=[/usr/sbin/dmidecode] error.cmd.Out=[]

CoreOS version:

DISTRIB_ID=CoreOS
DISTRIB_RELEASE=835.9.0
DISTRIB_CODENAME="Red Dog"
DISTRIB_DESCRIPTION="CoreOS 835.9.0"

Is there a more cloud-friendly way of getting the OpenStack instance id?

@clintkitson
Copy link
Member

Great question. Going to have to do some research on this one. Worst case
an option could be added for the driver that allows you to bypass
introspection and specify the instance id manually.

On Wednesday, January 6, 2016, scotthz [email protected] wrote:

When initializing the OpenStack storage driver, REX-Ray tries to execute
/usr/sbin/dmidecode, which is not available in CoreOS As a result,

DEBU[0000] error initializing driver driverName=Openstack errorprovider=Openstack
errorcmdPath="/usr/sbin/dmidecode" errorcmdArgs=[/usr/sbin/dmidecode] errorcmdOut=[]

DISTRIB_ID=CoreOS
DISTRIB_RELEASE=83590
DISTRIB_CODENAME="Red Dog"
DISTRIB_DESCRIPTION="CoreOS 83590"

Is there a more cloud-friendly way of getting the OpenStack instance id?


Reply to this email directly or view it on GitHub
#246.

@clintkitson
Copy link
Member

@scotthz Have you found any more information related? I spent a few minutes but have not come up with a better answer so far. I wonder if dmidecode is something that could be installed in another location?

@clintkitson clintkitson added this to the 0.3.2 milestone Jan 11, 2016
@scotthz
Copy link
Author

scotthz commented Jan 12, 2016

@clintonskitson I looked briefly for another method to find openstack id but didn't find anything. Worked around it for now to meet my current need.

Post-cloud-init, /bin, /sbin, /usr/bin, usr/sbin are all on a read-only filesystem in CoreOS. It occurred to me that they might be writeable during cloud-init. If so, it dmidecode could be written to usr/sbin when the VM is created. But that would probably break down when CoreOS updates itself.

/etc is writeable, but rexray would know to look there in the event that it finds itself running on coreos or /usr/sbin/dmidecode doesn't exist.

Or maybe the coreos people could add dmidecode to their distributions.

@CBR09
Copy link

CBR09 commented May 23, 2016

Hi @clintonskitson, I have similar issue. Any workaround on this?

time="2016-05-23T07:45:38Z" level=debug msg="error initializing driver" driverName=Openstack error.moduleName=default-docker error.cmd.Path="/usr/sbin/dmidecode" error.cmd.Args=[/usr/sbin/dmidecode] error.cmd.Out=[] error.provider=Openstack 
time="2016-05-23T07:45:38Z" level=info msg="docker volume driver initialized" availabilityZone= iops= moduleName=default-docker provider=docker size= volumeRootPath="/data" volumeType= 
time="2016-05-23T07:45:38Z" level=debug msg="checking volume path cache setting" pathCache=true 
time="2016-05-23T07:45:38Z" level=info msg=vdm.List driverName=docker moduleName=default-docker 
time="2016-05-23T07:45:38Z" level=info msg="listing volumes" driverName=docker moduleName=default-docker 
time="2016-05-23T07:45:38Z" level=error msg="default module(s) failed to start" 
time="2016-05-23T07:45:38Z" level=info msg="service sent registered modules start signals" 
time="2016-05-23T07:45:38Z" level=error msg="service initialized failed" 
time="2016-05-23T07:45:38Z" level=info msg="error initializing driver" m=&{0xc820310360 default-docker unix:///run/docker/plugins/rexray.sock The default docker module.} m.r=&{0xc8202fcfe0 0xc8203b3bb0 0xc8203b40e0 0xc8203b3bc0 default-docker map[ec2:0xc8202f3ce0 Rackspace:0xc8202ef3c0 ScaleIO:0xc8202f3830 linux:0xc820020390 gce:0xc8202ef680 Openstack:0xc820310420 VMAX:0xc8202985f0 XtremIO:0xc8203103c0 docker:0xc820020388 virtualbox:0xc8202fd780 Isilon:0xc82030f050]} 

Thanks

@clintkitson
Copy link
Member

@CBR09 Marking this as an enhancement request. We will look at making the bin file configurable. For now you could checkout ff03583 and modify the path and build.

@CBR09
Copy link

CBR09 commented May 25, 2016

Thanks @clintonskitson, Allow changing bin file config is good, now, I've build rexray in container and it works

@bretif
Copy link

bretif commented Jun 11, 2016

@clintonskitson: Impossible for me to build ff03583, I get this error

make: *** [_deps] Erreur 1 target: fmt ...formatting rexray...DEPRECATED Action signature. Must becli.ActionFunc. This is an error in the application. Please contact the distributor of this application if this is not you. See https://github.com/urfave/cli/blob/master/CHANGELOG.md#deprecated-cli-app-action-signature core/drivers_volume.go:130:6: expected operand, found 'range' core/drivers_volume.go:131:3: expected '{', found 'return' core/drivers_volume.go:138:6: expected operand, found 'range' core/drivers_volume.go:139:3: expected '{', found 'return' core/drivers_volume.go:146:6: expected operand, found 'range' core/drivers_volume.go:147:3: expected '{', found 'return' exit status 2 make: *** [_fmt] Erreur 1

Could you provide me with more details in order to get rid of this bug...

I am not familiar with go compilation. I tried to follow build-reference but with no success.
I you have any ressources that could help me.

Thanks by advance
Bertrand

@clintkitson
Copy link
Member

It looks like you go version is likely not 1.5.x?

@bretif
Copy link

bretif commented Jun 14, 2016

@clintonskitson You are right I was using a go version < 1.5

I just tried with go 1.6.1, but I stil get an error:

$ go version
go version go1.6.1 linux/amd64
$ git branch
* (HEAD detached at ff03583)
  master
  release/0.4.0
$ make build-linux-amd64
target: deps
  ...installing glide...SUCCESS!
  ...glide up...[WARN]  Only resolving dependencies for the current OS/Arch
[INFO]  Downloading dependencies. Please wait...
[INFO]  Fetching updates for github.com/Sirupsen/logrus.
[INFO]  Fetching updates for github.com/akutz/goof.
[INFO]  Fetching updates for github.com/spf13/pflag.
[INFO]  Fetching updates for github.com/spf13/cobra.
[INFO]  Fetching updates for github.com/spf13/viper.
[INFO]  Fetching updates for .
[INFO]  Fetching updates for github.com/emccode/goscaleio.
[INFO]  Fetching updates for github.com/emccode/goxtremio.
[INFO]  Fetching updates for github.com/akutz/golf.
[WARN]   appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
[INFO]  Fetching updates for github.com/akutz/gotil.
[INFO]  Fetching updates for github.com/go-yaml/yaml.
[INFO]  Fetching updates for github.com/rackspace/gophercloud.
[INFO]  Fetching updates for google.golang.org/api.
[INFO]  Fetching updates for golang.org/x/net.
[INFO]  Fetching updates for github.com/emccode/govmax.
[INFO]  Fetching updates for github.com/emccode/goisilon.
[INFO]  Fetching updates for github.com/appropriate/go-virtualboxclient.
[INFO]  Fetching updates for github.com/akutz/gofig.
[INFO]  Fetching updates for gopkg.in/yaml.v1.
[INFO]  Fetching updates for gopkg.in/yaml.v2.
[WARN]   appears to be a vendored package. Unable to set new version. Consider the '--update-vendored' flag.
[INFO]  Setting version for github.com/akutz/gofig to master.
[INFO]  Setting version for github.com/akutz/gotil to master.
[INFO]  Setting version for github.com/go-yaml/yaml to b4a9f8c4b84c6c4256d669c649837f1441e4b050.
[INFO]  Setting version for gopkg.in/yaml.v1 to b4a9f8c4b84c6c4256d669c649837f1441e4b050.
[INFO]  Setting version for gopkg.in/yaml.v2 to b4a9f8c4b84c6c4256d669c649837f1441e4b050.
[INFO]  Setting version for github.com/rackspace/gophercloud to 42196eaf5b93739d335921404bb7c5f2205fceb3.
[INFO]  Setting version for google.golang.org/api to fd081149e482b10c55262756934088ffe3197ea3.
[INFO]  Setting version for github.com/Sirupsen/logrus to feature/logrus-aware-types.
[INFO]  Setting version for github.com/akutz/golf to v0.1.1.
[INFO]  Setting version for github.com/emccode/govmax to 39eb25ef96221a595aea883ffded341d37750d51.
[INFO]  Setting version for github.com/spf13/cobra to 363816bb13ce1710460c2345017fd35593cbf5ed.
[INFO]  Setting version for github.com/emccode/goisilon to f9b53f0aaadb12a26b134830142fc537f492cb13.
[INFO]  Setting version for github.com/spf13/pflag to b084184666e02084b8ccb9b704bf0d79c466eb1d.
[INFO]  Setting version for golang.org/x/net to master.
[INFO]  Setting version for github.com/emccode/goxtremio to 89e87d4bdf43837a161fd36ad8dd32e0ce42ae98.
[INFO]  Setting version for github.com/spf13/viper to support/rexray.
[INFO]  Setting version for github.com/emccode/goscaleio to 53ea76f52205380ab52b9c1f4ad89321c286bb95.
[INFO]  Setting version for github.com/akutz/goof to master.
[INFO]  Setting version for github.com/appropriate/go-virtualboxclient to e0978ab2ed407095400a69d5933958dd260058cd.
[INFO]  Resolving imports
[INFO]  Downloading dependencies. Please wait...
[INFO]  Setting references for remaining imports
[WARN]   appears to be a vendored package. Unable to set new version. Consider the '--update-vendored' flag.
[INFO]  Versions did not change. Skipping glide.lock update.
[INFO]  Project relies on 20 dependencies.
SUCCESS!
  ...go get...SUCCESS!
target: fmt
  ...formatting rexray...SUCCESS!
target: build
  ...building rexray Linux-x86_64...# github.com/emccode/rexray/vendor/github.com/emccode/libstorage/vendor/github.com/emccode/libstorage/api/server/executors
vendor/github.com/emccode/libstorage/vendor/github.com/emccode/libstorage/api/server/executors/executors.go:21: undefined: _bindata
vendor/github.com/emccode/libstorage/vendor/github.com/emccode/libstorage/api/server/executors/executors.go:62: undefined: _bindata
# github.com/emccode/rexray/vendor/github.com/emccode/libstorage/api/context
vendor/github.com/emccode/libstorage/api/context/context.go:66: cannot use ctx (type *lsc) as type types.Context in field value:
    *lsc does not implement types.Context (wrong type for Join method)
        have Join(types.Context) types.Context
        want Join("github.com/emccode/rexray/vendor/github.com/emccode/libstorage/vendor/golang.org/x/net/context".Context) types.Context
vendor/github.com/emccode/libstorage/api/context/context.go:72: cannot use ctx (type *lsc) as type types.Context in return argument:
    *lsc does not implement types.Context (wrong type for Join method)
        have Join(types.Context) types.Context
        want Join("github.com/emccode/rexray/vendor/github.com/emccode/libstorage/vendor/golang.org/x/net/context".Context) types.Context
vendor/github.com/emccode/libstorage/api/context/context.go:83: undefined: types.ContextInstanceIDsByService
vendor/github.com/emccode/libstorage/api/context/context.go:89: undefined: types.ContextInstanceID
vendor/github.com/emccode/libstorage/api/context/context.go:96: undefined: types.ContextLocalDevicesByService
vendor/github.com/emccode/libstorage/api/context/context.go:102: undefined: types.ContextLocalDevices
vendor/github.com/emccode/libstorage/api/context/context.go:108: undefined: types.ContextProfile
vendor/github.com/emccode/libstorage/api/context/context.go:113: undefined: types.ContextRoute
vendor/github.com/emccode/libstorage/api/context/context.go:175: undefined: types.ContextKey
vendor/github.com/emccode/libstorage/api/context/context.go:113: too many errors
# github.com/emccode/rexray/vendor/github.com/emccode/libstorage/api/utils
vendor/github.com/emccode/libstorage/api/utils/utils_errors.go:31: undefined: types.ContextKey
vendor/github.com/emccode/libstorage/api/utils/utils_errors.go:38: undefined: types.ContextKey
vendor/github.com/emccode/libstorage/api/utils/utils_errors.go:44: undefined: types.ContextKey
# github.com/emccode/rexray/vendor/github.com/emccode/libstorage/client
vendor/github.com/emccode/libstorage/client/client.go:45: c.ctx.WithClient undefined (type types.Context has no field or method WithClient)
vendor/github.com/emccode/libstorage/client/client.go:48: c.ctx.WithServiceName undefined (type types.Context has no field or method WithServiceName)
vendor/github.com/emccode/libstorage/client/client.go:65: c.ctx.WithContextSID undefined (type types.Context has no field or method WithContextSID)
vendor/github.com/emccode/libstorage/client/client.go:65: undefined: types.ContextStorageDriver
vendor/github.com/emccode/libstorage/client/client.go:82: c.ctx.WithContextSID undefined (type types.Context has no field or method WithContextSID)
vendor/github.com/emccode/libstorage/client/client.go:82: undefined: types.ContextOSDriver
vendor/github.com/emccode/libstorage/client/client.go:93: c.ctx.WithContextSID undefined (type types.Context has no field or method WithContextSID)
vendor/github.com/emccode/libstorage/client/client.go:94: undefined: types.ContextIntegrationDriver
Makefile:228: recipe for target 'build_' failed
make[1]: *** [build_] Error 2
Makefile:283: recipe for target 'build-linux-amd64_' failed
make: *** [build-linux-amd64_] Error 2
make: Target 'build-linux-amd64' not remade because of errors.

Thanks for your reply

@codenrhoden
Copy link
Member

Closing due to inactivity. OpenStack can be revisited if new openstack driver is merged via https://github.com/codedellemc/libstorage/issues/182

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

No branches or pull requests

5 participants