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
=== modified file 'cluster/handlers.c'
--- cluster/handlers.c 2010-07-23 08:17:18 +0000
+++ cluster/handlers.c 2010-08-17 20:33:21 +0000
@@ -726,7 +726,7 @@
726 ret = 1;726 ret = 1;
727 } else {727 } else {
728 if (!allocated) {728 if (!allocated) {
729 snprintf(cmd, MAX_PATH, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add %s/32 dev %s", config->eucahome, src, vnetconfig->pubInterface);729 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);
730 logprintfl(EUCADEBUG,"running cmd %s\n", cmd);730 logprintfl(EUCADEBUG,"running cmd %s\n", cmd);
731 rc = system(cmd);731 rc = system(cmd);
732 rc = rc>>8;732 rc = rc>>8;
733733
=== modified file 'net/vnetwork.c'
--- net/vnetwork.c 2010-06-05 01:14:31 +0000
+++ net/vnetwork.c 2010-08-17 20:33:21 +0000
@@ -249,7 +249,7 @@
249 return(1);249 return(1);
250 }250 }
251251
252 snprintf(cmd, 256, "%s/usr/lib/eucalyptus/euca_rootwrap ip addr add 169.254.169.254 scope link dev %s", vnetconfig->eucahome, vnetconfig->privInterface);252 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);
253 rc = system(cmd);253 rc = system(cmd);
254 254
255 if (vnetconfig->cloudIp != 0) {255 if (vnetconfig->cloudIp != 0) {
@@ -1632,7 +1632,7 @@
1632 1632
1633 // snprintf(cmd, 1024, "%s/usr/lib/eucalyptus/euca_rootwrap ifconfig %s %s netmask %s up", vnetconfig->eucahome, devname, newip, netmask);1633 // snprintf(cmd, 1024, "%s/usr/lib/eucalyptus/euca_rootwrap ifconfig %s %s netmask %s up", vnetconfig->eucahome, devname, newip, netmask);
1634 slashnet = 32 - ((int)log2((double)(0xFFFFFFFF - vnetconfig->networks[vlan].nm)) + 1);1634 slashnet = 32 - ((int)log2((double)(0xFFFFFFFF - vnetconfig->networks[vlan].nm)) + 1);
1635 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);1635 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);
16361636
1637 logprintfl(EUCADEBUG, "vnetAddGatewayIP(): running cmd '%s'\n", cmd);1637 logprintfl(EUCADEBUG, "vnetAddGatewayIP(): running cmd '%s'\n", cmd);
1638 rc = system(cmd);1638 rc = system(cmd);