[openstack-dev] [Fuel][Plugins] How do avoid duplicated links in the dashboard?

2016-01-26 Thread Simon Pasquier
Hi all,

In the scope of the LMA plugins, we've played with the new ability to
insert links in the Fuel dashboard. This works fine from the UI standpoint
except that to avoid creating duplicate links we've come up with a solution
that is intricate and brittle IMO.
Basically we have an exec resource that sends a POST request to the Fuel
API and creates a "sentinel" file on the local filesystem if it succeeds
[1]. If the Puppet manifest is re-executed later on, the exec resource
won't be applied again if that file exists.
The problem arises when the node that created the link is re-provisioned or
replaced since it will generate duplicated links eventually.
Have someone find a better way to manage this?

Regards,
Simon

[1]
https://github.com/openstack/fuel-plugin-elasticsearch-kibana/blob/b85348aa964964f47dad1b08438e2d803ff20544/deployment_scripts/puppet/manifests/provision_services.pp#L38-L43
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Fuel][Plugins] How do avoid duplicated links in the dashboard?

2016-01-26 Thread Vitaly Kramskikh
Hi,

Sounds like a bug. I think we should prohibit adding duplicate links on
nailgun side, using link title + link url as a key.

I've created a bug: https://bugs.launchpad.net/fuel/+bug/1538209. I hope it
will be fixed by the HCF so that the fix will be included in 8.0.

2016-01-26 19:23 GMT+03:00 Simon Pasquier :

> Hi all,
>
> In the scope of the LMA plugins, we've played with the new ability to
> insert links in the Fuel dashboard. This works fine from the UI standpoint
> except that to avoid creating duplicate links we've come up with a solution
> that is intricate and brittle IMO.
> Basically we have an exec resource that sends a POST request to the Fuel
> API and creates a "sentinel" file on the local filesystem if it succeeds
> [1]. If the Puppet manifest is re-executed later on, the exec resource
> won't be applied again if that file exists.
> The problem arises when the node that created the link is re-provisioned
> or replaced since it will generate duplicated links eventually.
> Have someone find a better way to manage this?
>
> Regards,
> Simon
>
> [1]
> https://github.com/openstack/fuel-plugin-elasticsearch-kibana/blob/b85348aa964964f47dad1b08438e2d803ff20544/deployment_scripts/puppet/manifests/provision_services.pp#L38-L43
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Vitaly Kramskikh,
Fuel UI Tech Lead,
Mirantis, Inc.
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev