maas-devel team mailing list archive
-
maas-devel team
-
Mailing list archive
-
Message #00775
Help with new custom kernel_opts
Hello,
I'm currently adding the new kernel_opts (via tags) in my custom script
and I'm running into a problem.
Sample:
passed => hostname="201101-6951"
tagged_node = Node.objects.get(hostname=hostname)
kernel_options = " ".join((
preseed,
boot_type,
initrd,
netboot,
full_distro_path))
# Create new Tag with contructed values
new_item = tagged_node.tags.create(
name=tag_name,
definition="true",
kernel_opts=kernel_options)
created_tag = Tag.objects.get(name=tag_name)
created_tag.node_set.add(tagged_node)
This seems to work well using the maas shell. However, when I run the
script I can see that it creates the tag with the correct kernel
parameters. However it does not update the node information in the UI.
The node.get_effective_kernel_paramaters() shows (None, None).
Again, If I do a simple grab of the tag that was just created via the
script I'm running:
custom_tag = maasserver.models.Tag.objects.get(name="quantal_install_opts")
then do the following
workerNode = maassserver.modes.Node.objects.get(hostname="201101-6951")
workerNode.tags.add(custom_tag)
It works fine. Is there something else that needs to be called in my
script to update node with the proper tag?
Thanks
Follow ups