cfy_manager --add-networks replaces network list

Description

When running cfy_manager --add-networks --networks '{"NEW_NETWORK THAT SHOULD BE ADDED"}' it removes the old networks and add only the new one.
If we put the whole dict of networks again you get duplicate error

User must remove /etc/cloudify/ssl/certificate_metadata and run the add-networks cmd with the dict of all networks again.

Steps to Reproduce

Environment:
OS (CLI), HA cluster, cloud provider
------------------------------------
Create Cloudify manager 4.5 with single network.
Try to add to it one network with cfy_manager --add-networks

Steps to reproduce:
------------------
1.
2.
3.

Expected result:
---------------

Actual result:
-------------

Why Propose Close?

None

Activity

Show:
Jonathan Abramsohn
November 27, 2019, 3:38 PM

Will this be fixed for 5.0.5?

Ofer Yarom
November 27, 2019, 6:15 PM

I assume this is an “easy fix” so adding tentatively into 5.0.5. If we run out of fixes time or this is too complex, I am fine with pushing to 5.1.

The correction should be that adding a network will do “append” rather than replace it.

Barak Azulay
December 3, 2019, 1:19 PM

please note that this is not as simple as described above , I assume that simply adding the new dict to the old dict is not good enough as we need to verify there are no duplicated or collision (e.g. when 2 networks has the same name but a different value ?)

Although it does not seem to be complicated please consult before making any decision here.

Michael Glokhman
December 10, 2019, 1:04 PM
Edited

It seems like this bug doesn’t exist in 5.0.5 (both the managers table in DB and /etc/cloudify/ssl/certificate_metadata contain the correct networks after adding).

In 4.5, the certificate_metadata updates correctly. In the DB, the network data is stored in the provider_context table in binary format (not in the rest conf)
is there a way to reproduce the bug, i.e. check which networks are available after running add-networks? there seems to be no API for this

 

Barak Azulay
December 10, 2019, 1:21 PM

it looks like this is not a bug for 5.0.5 there for moving to CLOSE NOTABUG.

if you want to bring up of fixing 4.6 than please verify the problem actually exists there and bring it up in the bug meeting.

 

please CLOSE NOTABUG

Assignee

Michael Glokhman

Reporter

Jonathan Abramsohn

Severity

Medium

Target Version

5.0.5

Premium Only

no

Found In Version

4.5

QA Owner

None

Bug Type

legacy bug

Customer Encountered

Yes

Customer Name

c312

Release Notes

yes

Priority

None

Priority

Unprioritized
Configure