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

Ignition v0.32.0 fails with runtime error - slice bounds out of range #821

Closed
sravanip1017 opened this issue Jun 27, 2019 · 7 comments

Comments

Projects
None yet
4 participants
@sravanip1017
Copy link

commented Jun 27, 2019

Bug

Ignition v0.32.0 fails with runtime error - slice bounds out of range

Operating System Version

CoreOS Container Linux version 2135.4.0

Ignition Version

v0.32.0

What hardware/cloud provider/hypervisor is being used to run Ignition?
VMWare vCenter

Reproduction Steps

Deploy VM using ovftool with options guestinfo.coreos.config.data and guestinfo.coreos.config.data.encoding to inject ignition config on the first boot

Other Information

The ignition process on first boot seems to be working fine with ignition v0.31.0 but having issues with latest version v0.32.0
Below are the logs captured at the time of boot up
Screen Shot 2019-06-26 at 5 01 37 PM
Screenshot below has Ignition service failure logs from journalctl
Screen Shot 2019-06-26 at 5 06 38 PM

More logs:
go panic stack trace of ignition
ignition_go_panic_stack_trace

@arithx

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2019

It looks like this case in the VMware provider needs to exit with a nil config rather than continuing & the other stages can drop adding guestinfo. to the ovfDataKey & ovfEncodingKey rather than stripping them later.

@ajeddeloh

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2019

Thanks for the report. I'll try to get a fix for this merged tomorrow and it can go into next weeks alpha. It's probably in master too.

@utyagi24

This comment has been minimized.

Copy link

commented Jun 28, 2019

We are currently blocked by this issue as we are unable to deploy the stable channel image using ignition. Is there any update when we can expect a fix for this?

@ajeddeloh

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2019

I'm working on fix now, We'll roll out a new stable new week with the fix.

I presume, looking through the code, that this occurs with when no config is specified. As a workaround you can specify an empty config {"ignition": {"config": {"version": "2.3.0"}}} instead which should do nothing. I presume there's no cloud config either? If you need to enable cloud config you can instead specify this config: https://github.com/coreos/coreos-overlay/blob/master/coreos-base/oem-vmware/files/base/default.ign

@sravanip1017

This comment has been minimized.

Copy link
Author

commented Jun 28, 2019

@ajeddeloh In this case, we are specifying the ignition config. Here is a sample of what we have in ignition config file

{
	"ignition": {
		"version": "2.0.0"
	},
	"passwd": {
		"users": [{
			"name": "testuser",
			"create": {
				"uid": 1000,
				"homeDir": "/home/testuser",
				"groups": [
					"sudo",
					"docker"
				],
				"shell": "/bin/bash" 
			},
                        "passwordHash": "xxxxxxxxx"
		}]
	},
        "networkd": {
    		"units": [
     		 {
        		"name": "static.network",
                        "contents": "[Match]\nName=ens*\n\n[Network]\nAddress=x.x.x.x"
      }
    ]
  }

}

Please note that we are using guest:coreos.config.data instead of guestinfo.coreos.config.data to specify encoded ignition config as guestinfo.coreos.config.data doesn't work. Ovftool throws the following error

Error: Unknown option: 'X:guestinfo.coreos.config.data'
Completed with errors

(This issue was reported here)

@ajeddeloh

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2019

Fix is in #822. Working on building that in a test image to confirm it works. It should restore the old behavior.

@ajeddeloh

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2019

Closed via #822 and coreos/coreos-overlay#3702. We will roll out the fix on all channels next week

@ajeddeloh ajeddeloh closed this Jun 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.