[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Pulp init.d script



Init scripts are really intended to start and stop daemons, and of course pulp doesn't have one.  I think the most valuable way to think of pulp's init script is as a shortcut for starting and stopping all of the services that pulp depends on.  Perhaps that would be more appropriate in an admin tool (such as "pulp-admin start").

So what does it mean to "stop pulp"?  The same thing it means to stop wordpress, stop drupal, stop mediawiki, etc.  What you really want to do is prevent it from handling web requests.  That is an apache administration task.  The Debian style of apache config files makes it easy to enable and disable specific virtual hosts ("$ sudo a2ensite pulp"), but I don't know if the Red Hat land has something similar.

>From a systems perspective, if you have a server that runs pulp, wordpress, or any other web-based service, you install and configure the dependencies (web server, DBMS, etc.) to start on their own.

It's also worth considering that pulp may not be the only application on a server using apache, mongo, and qpid.  It could be considered rude to stop services that other, unrelated applications also depend on.

Lastly, it's a good idea for pulp to not make assumptions about its environment.  We support apache for now, but since it's just talking WSGI, it could run on a variety of web servers in the future.  Pulp might run on different distributions in the future that have different init script conventions, or it might even run on a completely different OS.

Michael

----- Original Message -----
From: "Jay Dobies" <jason dobies redhat com>
To: pulp-list redhat com
Sent: Wednesday, July 25, 2012 9:11:05 AM
Subject: Re: [Pulp-list] Pulp init.d script

On 07/25/2012 05:36 AM, Miroslav Suchý wrote:
> I encountered one problem with Pulp init.d script:
>
> When we start or stop Katello using
>   katello-service stop
> then httpd is stopped twice (the same for starting).
>
> I believe that Pulp init.d script should not start or stop other services.
> It is valid scenario that I may want to stop just Pulp, but not Apache,
> which should e.g. serve "Sorry we are in maintace" page.
>
> If you want to have script which start/stop all services, which Pulp
> use, you can steal:
>   /usr/bin/katello-service
> from Katello (which we steal from Spacewalk).
>
> May I kindly ask you to edit Pulp init.d script to start just Pulp?

The thing is, there is no Pulp outside of Apache. That script takes care 
of mongo, apache, and qpid. If you don't stop Apache, Pulp keeps running.

I'm confused at your maintenance page example though. If the issue is 
that Apache is started/stopped by Katello as well, how is that need met 
by us removing Apache from that init.d script?

I'm open to suggestions. We've talked about a *-service type script, but 
at the end of the day that's going to be the same thing where Apache is 
started/stopped/restarted to accomplish the Pulp notions of those 
operations.

-- 
Jay Dobies
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org

_______________________________________________
Pulp-list mailing list
Pulp-list redhat com
https://www.redhat.com/mailman/listinfo/pulp-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]