← Back to team overview

fuel-dev team mailing list archive

Re: [Fuel] Problem with diagnostic snapshot in case of services containerization

 

Just to put this into perspective.

We will need to extract diagnostic snapshot into a separate utility for the
reasons described here:
https://etherpad.openstack.org/p/openstack-diagnostics

Nevertheless, it should not preclude us from shipping a working diagnostic
snapshot in 5.0. So let's get it fixed.

Thanks,
Roman


On Sun, Apr 20, 2014 at 7:26 AM, Evgeniy L <eli@xxxxxxxxxxxx> wrote:

> Hi,
>
> I've made several patches for nailgun, shotgun and astute.
>
> https://review.openstack.org/#/c/89261/
> https://review.openstack.org/#/c/89260/
>
> I've tested them on the iso without RPMs.
> The issue which Andrew described occurred because we have hardcoded path
> to diagnostic snapshot script in orchestrator [0].
> I created yet another patch [1] (which depends on my patch for astute) to
> remove hardcoded path to the script.
> Do I need to fix shotgun.spec or to rebuild package? Or it will be done
> automatically?
>
> [0]
> https://github.com/stackforge/fuel-astute/blob/0cb0b26773bd269000a14748e8ba49419462ecaf/lib/astute/dump.rb#L23
> [1] https://review.openstack.org/#/c/89263/
>
> Thanks
>
>
> On Sat, Apr 19, 2014 at 11:45 AM, Mike Scherbakov <
> mscherbakov@xxxxxxxxxxxx> wrote:
>
>> I didn't look into the code, but I assume that's the reason of using
>> nailgun from shotgun - to get node details. So obviously nailgun library
>> would need a connection to DB & valid /etc/nailgun/settings.yaml. But you
>> don't need to start nailgun service in this case, you simply use it as a
>> library.
>>
>> > bind mounting /etc/nailgun from the nailgun container or reconfiguring
>> /etc/nailgun/settings.yaml via puppet
>> whatever can be considered as faster workaround, while the better
>> solution is being development.
>>
>> Thanks,
>>
>>
>>
>> On Sat, Apr 19, 2014 at 11:36 AM, Matthew Mosesohn <
>> mmosesohn@xxxxxxxxxxxx> wrote:
>>
>>> Mike,
>>>
>>> This would require either bind mounting /etc/nailgun from the nailgun
>>> container or reconfiguring /etc/nailgun/settings.yaml via puppet so
>>> that this nailgun on the mcollective container could log into the
>>> postgres DB to get node info.
>>>
>>> On Sat, Apr 19, 2014 at 11:32 AM, Mike Scherbakov
>>> <mscherbakov@xxxxxxxxxxxx> wrote:
>>> > I'm with Evgeny on #3.
>>> > However, as fast workaround, I see no issue having nailgun package
>>> installed
>>> > in two containers. One of them is nailgun service, and another - just
>>> > library, which is used by shotgun. It's like nova-compute importing
>>> > nova-network code locally (at least it was so a long time ago). It adds
>>> > mess, but it's satisfactory for fast workaround.
>>> > Can we do it or I'm missing something?
>>> >
>>> > Thanks,
>>> >
>>> > On Apr 19, 2014 4:59 AM, "Andrew Woodward" <xarses@xxxxxxxxx> wrote:
>>> >>
>>> >> packages already broke /opt/nailgun [1]
>>> >>
>>> >> [root@nailgun ~]# which nailgun_dump
>>> >> /usr/bin/nailgun_dump
>>> >>
>>> >> [1] https://bugs.launchpad.net/fuel/+bug/1309741
>>> >>
>>> >> On Fri, Apr 18, 2014 at 12:28 PM, Vladimir Kuklin <
>>> vkuklin@xxxxxxxxxxxx>
>>> >> wrote:
>>> >> > +1 to Matt's point
>>> >> >
>>> >> > It will be harder for us to do containers separation in future than
>>> to
>>> >> > update some data serialized by nailgun.
>>> >> >
>>> >> > 18 апр. 2014 г. 20:45 пользователь "Matthew Mosesohn"
>>> >> > <mmosesohn@xxxxxxxxxxxx> написал:
>>> >> >
>>> >> >> I think that we should push all the data needed to complete the
>>> dump
>>> >> >> task
>>> >> >> along with the task itself (json through to astute then to
>>> >> >> mcollective), so
>>> >> >> that Shotgun (diagnostic snapshot tool) could serve independently.
>>> >> >>
>>> >> >>
>>> >> >> On Fri, Apr 18, 2014 at 8:45 PM, Matthew Mosesohn
>>> >> >> <mmosesohn@xxxxxxxxxxxx>
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> I think that we should push all the data needed to complete the
>>> dump
>>> >> >>> task
>>> >> >>> along with the task itself (json through to astute then to
>>> >> >>> mcollective), so
>>> >> >>> that Shotgun (diagnostic snapshot tool) could serve independently.
>>> >> >>>
>>> >> >>>
>>> >> >>> On Fri, Apr 18, 2014 at 8:35 PM, Evgeniy L <eli@xxxxxxxxxxxx>
>>> wrote:
>>> >> >>>>
>>> >> >>>> Hi,
>>> >> >>>>
>>> >> >>>> How diagnostic snapshot works right now.
>>> >> >>>>
>>> >> >>>> * user clicks "diagnostic snapshot" button
>>> >> >>>> * nailgun creates a task and sends it to orchestrator [0]
>>> >> >>>> * orchestrator via mcollective runs 'execute_shell_commad' and
>>> >> >>>> mcollective plugin runs `/opt/nailgun/bin/nailgun_dump` command
>>> on
>>> >> >>>> the
>>> >> >>>> master node [1]
>>> >> >>>> * nailgun_dump is a part of nailgun codebase and it makes db
>>> calls to
>>> >> >>>> retrieve nodes and other configs [2] [3]
>>> >> >>>> * then it calls imported module shotgun, passes config and it
>>> >> >>>> generates
>>> >> >>>> snapshot [3]
>>> >> >>>>
>>> >> >>>> [0]
>>> >> >>>>
>>> >> >>>>
>>> https://github.com/stackforge/fuel-web/blob/0b10ed5fae7a8b140917c6b5381e1d14a2b0e727/nailgun/nailgun/task/task.py#L652-L666
>>> >> >>>> [1]
>>> >> >>>>
>>> >> >>>>
>>> https://github.com/stackforge/fuel-web/blob/0b10ed5fae7a8b140917c6b5381e1d14a2b0e727/nailgun/nailgun/task/task.py#L652-L666
>>> >> >>>> [2]
>>> >> >>>>
>>> >> >>>>
>>> https://github.com/stackforge/fuel-web/blob/0b10ed5fae7a8b140917c6b5381e1d14a2b0e727/nailgun/nailgun/task/task.py#L626-L650
>>> >> >>>> [3]
>>> >> >>>>
>>> >> >>>>
>>> https://github.com/stackforge/fuel-web/blob/0b10ed5fae7a8b140917c6b5381e1d14a2b0e727/nailgun/nailgun/task/task.py#L724
>>> >> >>>>
>>> >> >>>> As result nailgun and shotgun use each other's codebase, and we
>>> >> >>>> cannot
>>> >> >>>> install mcollective and nailgun in separate containers.
>>> >> >>>>
>>> >> >>>> How we can solve this problem
>>> >> >>>>
>>> >> >>>> 1. fast workaround, install mcollective and nailgun in a single
>>> >> >>>> container
>>> >> >>>> 2. shotgun can retrieve all necessary data via nailgun api
>>> >> >>>> 3. shotgun must have it's own executable endpoints and it should
>>> have
>>> >> >>>> nothing in common with nailgun.
>>> >> >>>> When nailgun creates task, it can send this config to
>>> orchestrator,
>>> >> >>>> orchestrator can save this config into the file [4] and then
>>> execute
>>> >> >>>> shotgun's endpoint and pass path to config file as a parameter.
>>> >> >>>>
>>> >> >>>> [4]
>>> >> >>>>
>>> >> >>>>
>>> https://github.com/stackforge/fuel-astute/blob/master/mcagents/uploadfile.rb
>>> >> >>>>
>>> >> >>>> I like third solustion but it will take some time to refactor our
>>> >> >>>> code.
>>> >> >>>> So, what do you think?
>>> >> >>>>
>>> >> >>>> Thanks
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> --
>>> >> >>>> Mailing list: https://launchpad.net/~fuel-dev
>>> >> >>>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>> >> >>>> Unsubscribe : https://launchpad.net/~fuel-dev
>>> >> >>>> More help   : https://help.launchpad.net/ListHelp
>>> >> >>>>
>>> >> >>>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> Mailing list: https://launchpad.net/~fuel-dev
>>> >> >> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>> >> >> Unsubscribe : https://launchpad.net/~fuel-dev
>>> >> >> More help   : https://help.launchpad.net/ListHelp
>>> >> >>
>>> >> >
>>> >> > --
>>> >> > Mailing list: https://launchpad.net/~fuel-dev
>>> >> > Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>> >> > Unsubscribe : https://launchpad.net/~fuel-dev
>>> >> > More help   : https://help.launchpad.net/ListHelp
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Andrew
>>> >> Mirantis
>>> >> Ceph community
>>> >>
>>> >> --
>>> >> Mailing list: https://launchpad.net/~fuel-dev
>>> >> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>> >> Unsubscribe : https://launchpad.net/~fuel-dev
>>> >> More help   : https://help.launchpad.net/ListHelp
>>> >
>>> >
>>> > --
>>> > Mailing list: https://launchpad.net/~fuel-dev
>>> > Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>> > Unsubscribe : https://launchpad.net/~fuel-dev
>>> > More help   : https://help.launchpad.net/ListHelp
>>> >
>>>
>>
>>
>>
>> --
>> Mike Scherbakov
>> #mihgen
>>
>
>
> --
> Mailing list: https://launchpad.net/~fuel-dev
> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~fuel-dev
> More help   : https://help.launchpad.net/ListHelp
>
>

References