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

Remove assumption that CoaL external NIC is e1000g0 #2

Closed
wants to merge 1 commit into from

Conversation

nshalman
Copy link
Contributor

@nshalman nshalman commented May 4, 2015

While doing some follow-up testing based on https://blog.shalman.org/running-sdc-coal-on-smartos/ I realized two possible issues:

  1. If I got the order of the NICs wrong this assumption would be invalid
  2. I am also testing out use of vioif nshalman/illumos-joyent@3e39bb3 which alters the name of the device and makes this just fail outright.

This patch addresses both of those issues.
Feedback requested.

function get_mac
{
local mac

mac=$(dladm show-phys -mpo address e1000g0)
[[ $? -eq 0 ]] || fatal "failed to run dladm"
mac=$(nictagadm list | awk '/^external/{print $2}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be using the nictagadm parseable form here, eg. -p?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If I'd noticed it existed I would have. Clearly I should update this. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like this?

nictagadm list -p -d ' ' | awk '/^external /{print $2}'

@nshalman
Copy link
Contributor Author

nshalman commented May 5, 2015

Let me know if that looks good and I'll squash and repush.

@nshalman
Copy link
Contributor Author

nshalman commented May 6, 2015

Old commits were nshalman@f1a88fd and nshalman@ac3ef61

@nshalman
Copy link
Contributor Author

ping!

@nshalman
Copy link
Contributor Author

Apparently that code doesn't work...

@nshalman
Copy link
Contributor Author

@pfmooney fixed it for me: nshalman@e7964af

@pfmooney
Copy link

Merge pending @nshalman's testing.

@nshalman
Copy link
Contributor Author

Confirmed that this worked to deploy Manta in a CoaL environment using vioif drivers (using my modified platform image).

pfmooney pushed a commit that referenced this pull request May 19, 2015
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
@pfmooney
Copy link

Merged in c376881.
Thanks

@pfmooney pfmooney closed this May 19, 2015
@nshalman nshalman deleted the patch-2 branch May 19, 2015 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants