Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Panic in xen container #24

Open
fzerorubigd opened this issue May 29, 2015 · 4 comments
Open

Panic in xen container #24

fzerorubigd opened this issue May 29, 2015 · 4 comments

Comments

@fzerorubigd
Copy link

I have a zen container and this is the output of ip addr show :

ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/void 
    inet 127.0.0.2/32 scope host venet0
    inet V.W.X.Y/32 brd V.W.X.Y scope global venet0:0

This is a default container created using proxmox, and I get a panic on the getHardwareAddr.

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x4737a4]

Depending on such thing is not a good idea, why not setting the hardware id by a method? developer should take care of uniqueness in the pool .

@albrow
Copy link
Owner

albrow commented May 29, 2015

@fzerorubigd thanks for bringing this to my attention. Did you mean a xen container? As in http://www.xenproject.org/.

@fzerorubigd
Copy link
Author

@albrow Sorry :)))) yes. it is xen.

@fzerorubigd fzerorubigd changed the title Panic in zen container Panic in xen container Jun 2, 2015
@albrow
Copy link
Owner

albrow commented Jun 21, 2015

@fzerorubigd I'm surprised that xen containers don't expose a mac address, and I'm sorry that I made an incorrect assumption here. What if I add a field to PoolConfig which lets you set your own id for the pool? If not provided, jobs will still default to the mac address-based id.

Something like:

type PoolConfig struct {
    // Id is a unique identifier for the pool. If not provided, jobs will attempt
    // to generate an id based on the machine's mac address
    Id string
    // (additional fields omitted here)
}

I also will try and fix the code so it doesn't panic when the mac address isn't found. Instead it will return an error message asking you to provide your own pool id.

Could you share the full stack trace so I can track down what went wrong?

@fzerorubigd
Copy link
Author

Thank you. yes, its enough :)

On Sun, Jun 21, 2015 at 4:32 AM, Alex Browne notifications@github.com
wrote:

@fzerorubigd https://github.com/fzerorubigd I'm surprised that xen
containers don't expose a mac address, and I'm sorry that I made an
incorrect assumption here. What if I add a field to PoolConfig which lets
you set your own id for the pool? If not provided, jobs will still default
to the mac address-based id.

Something like:

type PoolConfig struct {
// Id is a unique identifier for the pool. If not provided, jobs will attempt
// to generate an id based on the machine's mac address
Id string
// (additional fields omitted here)
}

I also will try and fix the code so it doesn't panic when the mac address
isn't found. Instead it will return an error message asking you to provide
your own pool id.

Could you share the full stack trace so I can track down what went wrong?


Reply to this email directly or view it on GitHub
#24 (comment).


http://fzero.rubi.gd

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

No branches or pull requests

2 participants