Opened 9 years ago

Closed 9 years ago

#159 closed (fixed)

services_post_boot_script not reporting $self.MAC() and $sliceID()

Reported by: lnevers@bbn.com Owned by: somebody
Priority: minor Milestone:
Component: Experiment Version: SPIRAL5
Keywords: services Cc:
Dependencies:

Description

This ticket is to track the resolution of two remaining issues in a services_post_boot_script discussion.

Background:

In an RSpec with a node named "geni1" that has an interface "geni1:0" and is connected to a link named "center". I can run this post boot script:

    <pbs:services_post_boot_script type="velocity">
    #!/bin/sh
    set -x
    IP=$self.IP(&quot;center&quot;)
    MAC=$self.MAC(&quot;geni1:0&quot;)
    NAME=$self.Name()
    VM=$self
    VMNAME=$geni1
    SLICE=$sliceName
    USER=$userDN
    SLICE=$sliceID
    </pbs:services_post_boot_script>

and get the following substitutions:

    root@debian:~# neuca-user-script
    #!/bin/sh
    set -x
    IP=172.16.1.1
    MAC=$self.MAC("geni1:0")
    NAME=geni1
    VM=name: geni1, macs: {center=null}, ips: {center=172.16.1.1/24}, links: [center], group: Not in Group
    VMNAME=name: geni1, macs: {center=null}, ips: {center=172.16.1.1/24}, links: [center], group: Not in Group
    SLICE=urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnxyz8
    USER=[urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers, lnevers@pgeni.gpolab.bbn.com]
    SLICE=$sliceID

The results above do not report $sliceID and $self.MAC information.

Change History (6)

comment:1 Changed 9 years ago by ahelsing@bbn.com

Priority: majorminor

comment:3 Changed 9 years ago by lnevers@bbn.com

Using version "ORCA Dungeness: v.4.0-SNAPSHOT.build-5468" on the NICTA rack created a sliver with two VMs. Each VM had the following service defined which uses all available velocity variables:

<services>
<pbs:services_post_boot_script type="velocity">
#!/bin/sh
set -x
IP=$self.IP(&quot;center&quot;)
MAC=$self.MAC(&quot;geni1:0&quot;)
NAME=$self.Name()
VM=$self
VMNAME=$geni1
SLICE=$sliceName
USER=$userDN
SLICE=$sliceID
</pbs:services_post_boot_script>
</services>

Once the VMs are ready, I logged in and checked neuca-user-script, and found that the script did not report and variables:

root@debian:~# neuca-user-script 

#!/bin/sh
set -x
IP=
root@debian:~# 

I think this may be a side effect of the manifest changes that were made to add additional interface information. This is the content of the manifest, when the sliver is created:

<services>
<execute command="
#!/bin/sh
set -x
IP="/>
        </services>
        <interface mac_address="fe:16:3e:00:1d:cb" client_id="VM-1:if0">
            <ip type="ipv4" netmask="255.255.255.0" address="10.10.1.1"/>
        </interface>

comment:4 Changed 9 years ago by ibaldin@renci.org

Something must be wrong with your script. One thing I can see is that $self.MAC() should refer to link name (presumably 'center'), rather than node name. I just ran a similar slice and here are all substitutions from your script:

#!/bin/sh set -x IP=172.16.0.1 MAC=fe:16:3e:00:73:31 NAME=Node0 VM=name: Node0, macs: {Link0=fe:16:3e:00:73:31}, ips: {Link0=172.16.0.1/30}, links: [Link0], group: Not in Group VMNAME=name: Node0, macs: {Link0=fe:16:3e:00:73:31}, ips: {Link0=172.16.0.1/30}, links: [Link0], group: Not in Group SLICE=test-templates-1 USER=[ibaldin@email.unc.edu, urn:publicid:IDN+panther+user+ibaldin, urn:uuid:6af1b2a2-e731-483c-9d8e-9fd440c4e469] SLICE=3c8d6c90-bd98-47d0-a02d-9fed58f95a19

comment:5 Changed 9 years ago by lnevers@bbn.com

You are right Ilia, once I updated the IP=$self.IP(&quot;center&quot;) and the MAC=$self.MAC(&quot;geni1:0&quot;) to use the link name and appropriate node name, I was able to get the neuca-user-script information on each of the allocated node.

The request to report $sliceID and $self.MAC works in this version.

comment:6 Changed 9 years ago by lnevers@bbn.com

Resolution: fixed
Status: newclosed

Using 'ORCA Dungeness: v.4.0-SNAPSHOT.build-5495' verified that this issues is resolved on the GPO rack. Output in sliver manifest:

<execute command="
#!/bin/sh
set -x
IP=10.10.1.2
MAC=$self.MAC(&amp;quot;geni2:0&amp;quot;)
NAME=geni2
VM=name: geni2, macs: {center=fe:16:3e:00:79:7f}, ips: {center=10.10.1.2/24}, links: [center], group: Not in Group
VMNAME=name: geni1, macs: {center=fe:16:3e:00:3e:3d}, ips: {center=10.10.1.1/24}, links: [center], group: Not in Group
SLICE=urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnpbs
USER=[urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers, lnevers@pgeni.gpolab.bbn.com]
SLICE=71d8e205-60f6-47bb-a7a7-208c372441c5     
"/>

Output from neuca tools:

root@debian:~# neuca-user-script

#!/bin/sh
set -x
IP=10.10.1.1
MAC=$self.MAC("geni1:0")
NAME=geni1
VM=name: geni1, macs: {center=fe:16:3e:00:3e:3d}, ips: {center=10.10.1.1/24}, links: [center], group: Not in Group
VMNAME=name: geni1, macs: {center=fe:16:3e:00:3e:3d}, ips: {center=10.10.1.1/24}, links: [center], group: Not in Group
SLICE=urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+lnpbs
USER=[urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers, lnevers@pgeni.gpolab.bbn.com]
SLICE=71d8e205-60f6-47bb-a7a7-208c372441c5
root@debian:~# 

Closing ticket.

Note: See TracTickets for help on using tickets.