Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svcdependencies auto computing #1683

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ypsah
Copy link

@ypsah ypsah commented Jul 20, 2015

This pull request is motivated by the fact that servicedependencies are rather useful but really complicated to correctly setup right now, especially on large clusters. Currently the 'host_name', 'dependent_host_name', 'hostgroup_name' and 'dependent_hostgroup_name' properties do not allow users to define host by host servicedependencies or service to service dependencies at once.
The idea is to compute the hosts that have the dependent service and the service depended upon and create a servicedependecy for each one of them.
For more details please look at the message from 3rd commit.

@ypsah ypsah force-pushed the svcdependencies_auto_computing branch from 1231522 to 0525302 Compare July 20, 2015 14:28
@ypsah ypsah force-pushed the svcdependencies_auto_computing branch 3 times, most recently from abad064 to a2cb2e9 Compare August 19, 2015 11:58
@ypsah
Copy link
Author

ypsah commented Aug 19, 2015

I also fixed the host to host servicedependencies creation as described here and reported as an issue : #603
I would like instructions as to how I am supposed to document this patch if you are interested in it.

Quentin Bouget added 4 commits August 27, 2015 16:35
What:
    Create dependencies between services host by host without the need
    to write long and dull configuration files.

Why:
    Because servicedependencies are rather useful but really complicated
    to correctly setup right now, especially on large clusters.
    Currently the host_name, dependent_host_name, hostgroup_name and
    dependent_hostgroup_name properties do not allow users
    to define host by host servicedependencies or service to service
    dependencies at once.

How:
    Users will just need to define the service and the dependent_service
    descriptions in the servicedependency configuration.
    The function Servicedependency.explode will then compute the hosts
    having both the dependent_service and the service depended on, and for
    these hosts a servicedependency will be created.

Example:
    With this configuration:

        define host{
            ...
            host_name   h0
        }

        define host{
            ...
            host_name   h1
        }

        define service{
            ...
            service_description svc0
            host_name           h0, h1
        }

        define service{
            ...
            service_description svc1
            host_name           h0, h1
        }

        define servicedependency{
            service_description svc0
            dependent_service_description svc1
        }

    We will create these servicedependencies:

        define servicedependency{
            service_description             svc0
            dependent_service_description   svc1
            host_name                       h0
        }

        define servicedependency{
            service_description             svc0
            dependent_service_description   svc1
            host_name                       h1
        }

And:
    - Each couple of service/dependent_service will be processed separately
    - Tests for the new feature are also in this commit
Using auto-computing of servicedependencies
@ypsah ypsah force-pushed the svcdependencies_auto_computing branch from a2cb2e9 to 56d4d10 Compare August 27, 2015 14:36
@naparuba
Copy link
Contributor

naparuba commented Oct 1, 2015

Thanks and sorry for the delay. I4l have a close look for 2.6 (I'm getting PR for 2.4.2 currently)

@ypsah
Copy link
Author

ypsah commented Oct 3, 2015

Thanks for the reply. When you get the chance, please also take a look at this as both have been integrated at the CEA and are working just fine.

@olivierHa
Copy link
Collaborator

This seems legit and a new great feature ! @naparuba , any suggestions ? Can I merge it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants