NodeMetadata group property is null.

20 views
Skip to first unread message

Kenneth Nagin

unread,
Feb 8, 2012, 11:59:50 AM2/8/12
to jclouds
NodeMetadata is not recording the group and name.
It is not just and issue of NodeMetadata not displaying properly,
The ComputeService.listNodesDetailsMatching with filter inGroup() does
not find the desired group, e.g.
iNodeMetadatas = filter(mCompute.listNodesDetailsMatching(all()),
and(inGroup(pGroupName), not(TERMINATED));
The iNodeMetadatas is empty.

This is the code segment to create a node and print out NodeMetadata.

iNodeMetadata =
getOnlyElement(mCompute.createNodesInGroup(System.getProperty("user.name"),
1, template));
System.out.printf("VMInstance group=%s iNodeMetadata=%s%n",
iNodeMetadata.getGroup(),iNodeMetadata);

Results from printf for windows instance:

VMInstance group=null iNodeMetadata=[id=us-east-1/i-4b6df22e,
providerId=i-4b6df22e, group=null, name=null, location=[id=us-east-1c,
scope=ZONE, description=us-east-1c, parent=us-east-1, iso3166Codes=[US-
VA], metadata={}], uri=null, imageId=us-east-1/ami-133fee7a,
os=[name=null, family=windows, version=, arch=hvm, is64Bit=false,
description=300629125119/Windows-2003R-i386-Base-cygwin-
ts-2012-02-01], state=RUNNING, loginPort=22,
hostname=ip-10-245-205-106, privateAddresses=[10.245.205.106],
publicAddresses=[23.20.9.160], hardware=[id=t1.micro,
providerId=t1.micro, name=null, processors=[[cores=1.0, speed=1.0]],
ram=630, volumes=[[id=vol-51bb763d, type=SAN, size=null, device=/dev/
sda1, durable=true, isBootDevice=true]],
supportsImage=And(requiresRootDeviceType(ebs),Or(isWindows(),requiresVirtualizationType(paravirtual)),ALWAYS_TRUE,ALWAYS_TRUE),
tags=[]], loginUser=root, userMetadata={}, tags=[]]


Results from printf for ubuntu instance:


VMInstance group=null iNodeMetadata=[id=us-east-1/i-3722bd52,
providerId=i-3722bd52, group=null, name=null, location=[id=us-east-1b,
scope=ZONE, description=us-east-1b, parent=us-east-1, iso3166Codes=[US-
VA], metadata={}], uri=null, imageId=us-east-1/ami-b94f85d0,
os=[name=null, family=ubuntu, version=, arch=paravirtual,
is64Bit=false, description=300629125119/ubuntu-aeskulap],
state=RUNNING, loginPort=22, hostname=ip-10-72-81-36,
privateAddresses=[10.72.81.36], publicAddresses=[50.16.31.46],
hardware=[id=t1.micro, providerId=t1.micro, name=null,
processors=[[cores=1.0, speed=1.0]], ram=630,
volumes=[[id=vol-8fd21fe3, type=SAN, size=null, device=/dev/sda1,
durable=true, isBootDevice=true]],
supportsImage=And(requiresRootDeviceType(ebs),Or(isWindows(),requiresVirtualizationType(paravirtual)),ALWAYS_TRUE,ALWAYS_TRUE),
tags=[]], loginUser=root, userMetadata={}, tags=[]]


In the EC2, the console displays the group is being assigned to the VM
instance name plus a unique prefix.
It also shows that the name is added as user supplied Name tag.

Adrian Cole

unread,
Feb 8, 2012, 12:48:25 PM2/8/12
to jcl...@googlegroups.com
this could happen if you override the security groups.  do you happen to know the security groups for this instance?

Cheers,
-a


--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.


Adrian Cole

unread,
Feb 9, 2012, 5:49:11 AM2/9/12
to jcl...@googlegroups.com
Hi, Kenneth.

I think the solution you'd be best with is us implementing means to use aws-ec2 tags for persisting the jclouds group as opposed to encoding it in security group names.

I thought we had an issue for this, but seems we don't.  want to make one?

http://code.google.com/p/jclouds/issues/entry
-A

On Thu, Feb 9, 2012 at 6:45 AM, Kenneth Nagin <kna...@gmail.com> wrote:
Indeed, I am overriding the security group.  But I did this
intentionally so I could separate the security groups from "user"
groups.
I intended to use the groups to create a sort of multi-tenancy amongst
the VM instances.  I'm implementing a service that will allow
multiple users to share the same image, but create their own set of VM
instances.  They could then manage their instances based on their
group.
Is there a way I can have my cake and it to?

Kenneth Nagin

unread,
Feb 26, 2012, 6:55:32 AM2/26/12
to jclouds
An easy work around is to use options.inboundPorts when creating the
template instead of specifying security groups.
For my limited requirement this was sufficient.
Is there more to security groups than defining the inboundPorts?

I think that a feature that would provide the most potential benefit
would be to support handling of user defined metadata data on VM
instances.
Ideally, the user could update, read, and search on the running
instance's metadata.
The user could better manage their instances with this feature.

If you agree I will open an issue on this idea.

-K

Adrian Cole

unread,
Feb 26, 2012, 6:59:40 AM2/26/12
to jcl...@googlegroups.com
Hi, Kenneth.

As of 1.3, userMetadata is supported on aws-ec2, so you can save your
coding for other features :P

Cheers,
-a

Reply all
Reply to author
Forward
0 new messages