[Fuego] Fuego v1.3.0 : ftc remove-nodes issue even when security is disabled
Tim.Bird at sony.com
Tim.Bird at sony.com
Mon Mar 4 22:26:09 UTC 2019
Thanks for the report. I checked, and these bugs were introduced
and fixed during the 1.4 development cycle.
The typos (install_nodes vs. installed_nodes, and nodes vs node)
were introduced in commit 8eaf3ab0 (v1.3.0-172), and fixed
in commit c3f3c34b (v1.3.0-297). Thus, there were fixed
during 1.4 development (version 1.4.0 would correspond to
v1.3.0-314.
I'm not sure why the version of Fuego you are using is within the
bad range. (You can find where you are in the commit sequence
with 'git describe'). You should upgrade to version 1.4
(the latest release on the master branch).
If that's a problem, please let me know. The conversion from 1.3 to
1.4 was supposed to be relatively easy, but obviously bugs get introduced
and fixed during development. The 1.5 release is a quite large jump,
which is why I'm keeping it on a 'next' branch. The next branch is more
of a 'use at your own risk' branch, as things are expected to possibly be
temporarily broken during development.
-- Tim
> -----Original Message-----
> From: Dhinakar Kalyanasundaram
>
> Hi,
>
>
>
> Sorry again, there is one more issue, this time the command executed but
> node was still present because of another typo (shown below)
>
> 'for nodes in options:' -> 'for node in options'.
>
> also
>
> installed_nodes = [n['name'] for n in server.get_nodes()] (replaced node
> with n as the comparison is same)
>
>
>
> I have pasted the working code below:
>
>
>
> def do_rm_nodes(conf, options):
> global server
>
> installed_nodes = [node['name'] for node in server.get_nodes()]
> dprint("installed nodes=%s" % installed_nodes)
> if not options:
> # no args?, remove all installed nodes!
> # FIXTHIS: add warning or ask for -f
> options = installed_nodes
> else:
> for node in options:
> if node not in installed_nodes:
> raise Exception('Node \'%s\' not found.' % node)
>
> for node in options:
> installed_nodes = [n['name'] for n in server.get_nodes()]
> if node not in installed_nodes:
> # in case the same node is repeated in options
> continue
> if node == 'master':
> # the master node is special in jenkins
> continue
> server.delete_node(node)
> sys.exit(0)
>
>
> Regards,
>
> Dhinakar
>
>
>
>
>
> --------- Original Message ---------
>
> Sender : Dhinakar Kalyanasundaram <dhinakar.k at samsung.com> Staff
> Engineer/FDS SW /SSIR/Samsung Electronics
>
> Date : 2019-03-04 18:22 (GMT+5:30)
>
> Title : RE: Fuego v1.3.0 : ftc remove-nodes issue even when security is
> disabled
>
>
>
> Hi all,
>
>
>
> I debugged it and found it is because of a bug (a typo).
>
> Somehow it did not show up until this time :)
>
> In the fuego-core/engine/scripts/ftc file, in function 'def do_rm_nodes(conf,
> options)',
>
> install_nodes need to be changed to installed_nodes
>
> Then it will work.
>
> I have pasted the function below for reference.
>
> Note: This issue has already been fixed in Fuego v1.4.0 version.
>
>
>
> def do_rm_nodes(conf, options):
> global server
>
> installed_nodes = [node['name'] for node in server.get_nodes()]
> if not options:
> # no args?, remove all installed nodes!
> # FIXTHIS: add warning or ask for -f
> options = installed_nodes
> else:
> for node in options:
> if node not in install_nodes:
> raise Exception('Node \'%s\' not found.' % node)
>
> for nodes in options:
> installed_nodes = [node['name'] for node in server.get_nodes()]
> if node not in installed_nodes:
> # in case the same node is repeated in options
> continue
> if node == 'master':
> # the master node is special in jenkins
> continue
> server.delete_node(node)
> sys.exit(0)
>
>
>
> Regards,
>
> Dhinakar
>
>
>
>
>
> --------- Original Message ---------
>
> Sender : Dhinakar Kalyanasundaram <dhinakar.k at samsung.com> Staff
> Engineer/FDS SW /SSIR/Samsung Electronics
>
> Date : 2019-03-04 12:31 (GMT+5:30)
>
> Title : Fuego v1.3.0 : ftc remove-nodes issue even when security is disabled
>
>
>
> Dear Fuego Users,
>
> I am getting the below error while trying to remove a node (added via ftc
> add-nodes -b xxx command) in Fuego v1.3.
>
>
>
> root at linux-2030047407:/ <mailto:root at linux-2030047407:/> # ftc rm-nodes
> ARM64-SSH-Test1
> global name 'install_nodes' is not defined
> Usage: ftc rm-nodes [<node1> <node2> ...]
> Use list-nodes to see the existing nodes.
>
> If no node is provided all existing nodes will be removed.
>
>
>
> Able to add and list the nodes (as shown below):
>
> root at linux-2030047407:/ <mailto:root at linux-2030047407:/> # ftc list-nodes
> Jenkins nodes in this system:
> ARM64-SSH-Test
> ARM64-SSH-Test1
> ARM64-Serial-Test
> X86-SSH-Test
>
>
> Note: Initially I had Security enabled (Access Control -> Jenkins' own user
> database and Authorization -> Anyone can do anything).
>
> Was able to add node with the above security.
>
> Later I disabled security and tried to remove the node 'ftc rm-nodes
> ARM64-SSH-Test1' but got the above same error (global name 'install_nodes'
> is not defined).
>
> But was able to delete the node from Jenkin's UI interface (Fuego
> dashboard). This is the current work-around.
>
>
>
> Regards,
>
> Dhinakar
>
>
>
>
>
>
>
> <http://ext.samsung.net/mail/ext/v1/external/status/update?userid=dhina
> kar.k&do=bWFpbElEPTIwMTkwMzA0MTM0OTE4ZXBjbXM1cDJmMTQzZjIxM
> ThkN2JjOGFjYmIwNjc0MjdiNTU3MTJkYiZyZWNpcGllbnRBZGRyZXNzPVRpbS5
> CaXJkQHNvbnkuY29t>
More information about the Fuego
mailing list