Merge lp:~kirkland/eucalyptus/label-metadata into lp:eucalyptus

Proposed by Dustin Kirkland 
Status: Needs review
Proposed branch: lp:~kirkland/eucalyptus/label-metadata
Merge into: lp:eucalyptus
Diff against target: 34 lines (+3/-3)
2 files modified
cluster/handlers.c (+1/-1)
net/vnetwork.c (+2/-2)
To merge this branch: bzr merge lp:~kirkland/eucalyptus/label-metadata
Reviewer Review Type Date Requested Status
Eucalyptus Maintainers Pending
Review via email: mp+32928@code.launchpad.net

Description of the change

See commit message

To post a comment you must log in.

Unmerged revisions

1232. By Dustin Kirkland 

cluster/handlers.c, net/vnetwork.c: label the 169.254.169.254 link
local address with :metadata, the public vm ip addresses with :pub,
and the private vm ip addresses with :priv, to separate it appropriately
(LP: #451607, #452754)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cluster/handlers.c'
2--- cluster/handlers.c 2010-07-23 08:17:18 +0000
3+++ cluster/handlers.c 2010-08-17 20:33:21 +0000
4@@ -726,7 +726,7 @@
5 ret = 1;
6 } else {
7 if (!allocated) {
8- snprintf(cmd, MAX_PATH, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add %s/32 dev %s", config->eucahome, src, vnetconfig->pubInterface);
9+ snprintf(cmd, MAX_PATH, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add %s/32 dev %s:pub label %s:pub", config->eucahome, src, vnetconfig->pubInterface, vnetconfig->pubInterface);
10 logprintfl(EUCADEBUG,"running cmd %s\n", cmd);
11 rc = system(cmd);
12 rc = rc>>8;
13
14=== modified file 'net/vnetwork.c'
15--- net/vnetwork.c 2010-06-05 01:14:31 +0000
16+++ net/vnetwork.c 2010-08-17 20:33:21 +0000
17@@ -249,7 +249,7 @@
18 return(1);
19 }
20
21- snprintf(cmd, 256, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add 169.254.169.254 scope link dev %s", vnetconfig->eucahome, vnetconfig->privInterface);
22+ snprintf(cmd, MAX_PATH, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add 169.254.169.254 scope link dev %s:metadata label %s:metadata", vnetconfig->eucahome, vnetconfig->privInterface, vnetconfig->privInterface);
23 rc = system(cmd);
24
25 if (vnetconfig->cloudIp != 0) {
26@@ -1632,7 +1632,7 @@
27
28 // snprintf(cmd, 1024, "%s/usr/lib/eucalyptus/euca_rootwrap ifconfig %s %s netmask %s up", vnetconfig->eucahome, devname, newip, netmask);
29 slashnet = 32 - ((int)log2((double)(0xFFFFFFFF - vnetconfig->networks[vlan].nm)) + 1);
30- snprintf(cmd, MAX_PATH, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add %s/%d broadcast %s dev %s", vnetconfig->eucahome, newip, slashnet, broadcast, devname);
31+ snprintf(cmd, MAX_PATH, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add %s/%d broadcast %s dev %s:priv label %s:priv", vnetconfig->eucahome, newip, slashnet, broadcast, devname, devname);
32
33 logprintfl(EUCADEBUG, "vnetAddGatewayIP(): running cmd '%s'\n", cmd);
34 rc = system(cmd);