You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alex Karasulu <ak...@apache.org> on 2007/05/16 16:48:57 UTC
[ApacheDS][RPM] Layout and uninstall concerns (was: Re: [Installer] rpm -e update)
Hi Ole,
On 5/16/07, Ole Ersoy <ol...@gmail.com> wrote:
>
> Hey Alex,
>
> You are right.
>
> When I run rpm -e
> everything is cleaned out except for
> apacheds's home directory and the immediate
> sub directories.
Hmmm ok the immediate subdirectories should all be removed including the var
directory
if it does not have any partitions. If you install ADS then start her up so
partitions are created
then do the rpm -e then only the var/partitions directory should remain in
theory it the files
for the created partitions (i.e. example/master.db and schema/.... etc).
So if I do
> [root@/usr/local/apacheds-1.5.0]# rpm -e apacheds
>
> Then I'm just left with this:
> [root@/usr/local/apacheds-1.5.0]# tree
> |-- bin
> |-- conf
> |-- lib
> `-- var
>
> Note also that var is empty.
Hmmm did you start up the server before the rpm -e ?
My initial assumption/expectation was
> that it would remove everything, including the
> root apacheds-1.5.0 directory.
Yeah it should if you did not create partitions. It should not if you did
create partitions. The idea here is not to destroy data you might have
added while removing the software.
When the installer uses the FHS layout,
> the partitions will be housed in
> /var/partitions/...
> which will hopefully make rpm upgrades
> easy to manage.
It should probably be /var/apacheds/1.5.x/instanceN/partitions no?
We should separate the data from different versions and different instances
running off those versions?
Alex
Re: [ApacheDS][RPM] Layout and uninstall concerns (was: Re: [Installer]
rpm -e update)
Posted by Emmanuel Lecharny <el...@apache.org>.
Chris Custine a écrit :
> Just to clarify a couple of things, the correct dir for ApacheDS data on
> Linux distros is /var/lib/apacheds.
I agree. Having the data in /usr/local is not really usual. When you set
up a Linux partition, you set /var/libn wide enough to handle data.
> If you look at any install of MySQL or
> Postgres, they use /var/lib for the base. As far as the instances,
> this is
> to support running multiple instances (not versions) of ApacheDS (like
> different ports, different partition configs, etc.) but all using the
> same
> install image in /usr/local.
Agreed again.
> I am also working on getting it so that you
> can run each instance with different JVM parameters or even different
> JVM's
> alltogether.
Man, I love you ! This is something I really want to have, as I'm
sometime doing some benchmarks with all the different versions of ADS,
and it's painfull to have to modify the daemon conf to use different
versions and different JVMs. I can easily manage different version, but
switching the JVM is a little bit painfull atm.
> At this point, I am not addressing multiple versions of
> ApacheDS on one machine, but if that becomes something that people
> want we
> can look at it, however I think the partition DB versioning will be a
> mess
> so its probably not worth doing.
Well, the main problem I see is that if the daemon has different names,
then it become a problem to support (the mailing list will be full of
"Your doco say my daemon's name should be apacheDS but mine is
apacheDS-1.0.2 ..."). However, we should be able to run more than one
ADS on a single machine, just because you might want to upgrade from 1.0
to 2.0, for instance. As the data may be stored differently, you will
have to do a migration, having both data on the same place.
Thanks Chris to address all those points ! This will help a lot our user
(and us too :)
Emmanuel
Re: [ApacheDS][RPM] Layout and uninstall concerns (was: Re: [Installer]
rpm -e update)
Posted by Ole Ersoy <ol...@gmail.com>.
Chris Custine wrote:
> Just to clarify a couple of things, the correct dir for ApacheDS data on
> Linux distros is /var/lib/apacheds.
> If you look at any install of MySQL
> or Postgres, they use /var/lib for the base.
Amen to that. Here's the FHS Link just to piggy back:
http://www.pathname.com/fhs/2.2/fhs-5.8.html
Thanks for solidifying that Chris.
> As far as the instances,
> this is to support running multiple instances (not versions) of ApacheDS
> (like different ports, different partition configs, etc.) but all using
> the same install image in /usr/local.
Would they run against the same /var/lib data?
If so, could that cause concurrency errors?
Is this mainly for a testing environment?
> I am also working on getting it
> so that you can run each instance with different JVM parameters or even
> different JVM's alltogether.
Now that's cool.
> At this point, I am not addressing
> multiple versions of ApacheDS on one machine, but if that becomes
> something that people want we can look at it, however I think the
> partition DB versioning will be a mess so its probably not worth doing.
Shucks - My totally shooting from the hip thinking
is that the easy part is having
multiple versions of ADS on the same host and
the running multiple instances against the
same repo is the tricky part (I'm assuming they are
running at the same time).
So a host might have installed:
/usr/local/apacheds-1.5.0
/usr/local/apacheds-worlds-best-ldap-server.0
/usr/local/apacheds-u-cant-touch-this.0
and they all read /var/lib/apacheds/"data-files".
My assumption is that these are not intended
to be run at the same time, and each version
would create the lock file so that the other versions
could not run.
(FHS Lock File Location)
http://www.pathname.com/fhs/2.2/fhs-5.9.html
Also /var/lib/apacheds/"data-files" would only
go through an updating process when for example
when upgrading from
/usr/local/apacheds-worlds-best-ldap-server.0
to
/usr/local/apacheds-u-cant-touch-this.0
the data repository format requirements of
/usr/local/apacheds-u-cant-touch-this.0
are different from
/usr/local/apacheds-worlds-best-ldap-server.0
And in this case the two server versions
would not co-exist on the same host.
Cheers,
- Ole
SNIP
Re: [ApacheDS][RPM] Layout and uninstall concerns (was: Re: [Installer] rpm -e update)
Posted by Chris Custine <ch...@gmail.com>.
Just to clarify a couple of things, the correct dir for ApacheDS data on
Linux distros is /var/lib/apacheds. If you look at any install of MySQL or
Postgres, they use /var/lib for the base. As far as the instances, this is
to support running multiple instances (not versions) of ApacheDS (like
different ports, different partition configs, etc.) but all using the same
install image in /usr/local. I am also working on getting it so that you
can run each instance with different JVM parameters or even different JVM's
alltogether. At this point, I am not addressing multiple versions of
ApacheDS on one machine, but if that becomes something that people want we
can look at it, however I think the partition DB versioning will be a mess
so its probably not worth doing.
Chris
On 5/16/07, Ole Ersoy <ol...@gmail.com> wrote:
>
> Howdy,
>
> This part is only slightly related - but might
> be nice to be aware of:
>
> rpm -e WITHOUT first stopping ADS
> ==========================================
> I fired up ADS, ran some tests, and
> then ran rpm -e
>
> This left everything in tact, except
> it deleted the apacheds shell script
> from /etc/init.d, so when I went to stop
> ADS I had to copy the script back from somewhere else.
>
> Then I tried running rpm -e again, and it told me
> apacheds is not installed.
>
> All the files are still on my system though.
>
> This sounds a little like an RPM bug or maybe there
> is a way to tell RPM "Don't uninstall if I'm running."
> ==========================================
>
>
> rpm -e with stoppage
> ==========================================
> Same thing as before but I'm stopping ADS this time.
> I started ADS, ran tests that added data, stopped it, rpm -e and:
>
> [root@localhost apacheds-1.5.0]# tree
> .
> |-- bin
> |-- conf
> |-- lib
> `-- var
> `-- apacheds.lock
> ==========================================
>
> > Yeah it should if you did not create partitions. It should not if you
> did
> > create partitions. The idea here is not to destroy data you might have
> > added while removing the software.
>
> I like this idea :-)
>
> >
> > When the installer uses the FHS layout,
> > the partitions will be housed in
> > /var/partitions/...
> > which will hopefully make rpm upgrades
> > easy to manage.
> >
> >
> > It should probably be /var/apacheds/1.5.x/instanceN/partitions no?
>
> Yes - Right - Something like this. Sorry I left the apacheds part out...
>
> I think I'd probably leave the version out though if the idea
> is to have a a ldap data repository that is cross version compatible...
>
> Hmmm .... instanceN...this seems to imply multiple instances
> of ADS (Same version) possible running...I thought the lock file made
> sure only one instance could be run on a host?
>
> Were you maybe thinking multiple instances of different version of
> ADS?
>
> That would probably throw a fork wrench in the idea of leaving the
> version number out of the /var/apacheds/ location for the
> ldap data repository.
>
> I imagine though that most users would want a single version
> installed, and then during an upgrade, they would just upgrade
> and the new version uses the same repository.
>
> It could be that the upgrade requires changes to the repository.
> Like with subversion we have to do a dump, run some
> shell script on the dump, and then put the result back.
>
> >
> > We should separate the data from different versions and different
> instances
> > running off those versions?
>
> That sounds smart.
> So the actual ads partition repository is /var/apacheds/
>
> I'm trying to understand the different instances part? Do
> you mean that there are multiple instances of ADS running on the same
> host?
>
> Cheers,
> - Ole
>
>
>
Re: [ApacheDS][RPM] Layout and uninstall concerns (was: Re: [Installer]
rpm -e update)
Posted by Ole Ersoy <ol...@gmail.com>.
Howdy,
This part is only slightly related - but might
be nice to be aware of:
rpm -e WITHOUT first stopping ADS
==========================================
I fired up ADS, ran some tests, and
then ran rpm -e
This left everything in tact, except
it deleted the apacheds shell script
from /etc/init.d, so when I went to stop
ADS I had to copy the script back from somewhere else.
Then I tried running rpm -e again, and it told me
apacheds is not installed.
All the files are still on my system though.
This sounds a little like an RPM bug or maybe there
is a way to tell RPM "Don't uninstall if I'm running."
==========================================
rpm -e with stoppage
==========================================
Same thing as before but I'm stopping ADS this time.
I started ADS, ran tests that added data, stopped it, rpm -e and:
[root@localhost apacheds-1.5.0]# tree
.
|-- bin
|-- conf
|-- lib
`-- var
`-- apacheds.lock
==========================================
> Yeah it should if you did not create partitions. It should not if you did
> create partitions. The idea here is not to destroy data you might have
> added while removing the software.
I like this idea :-)
>
> When the installer uses the FHS layout,
> the partitions will be housed in
> /var/partitions/...
> which will hopefully make rpm upgrades
> easy to manage.
>
>
> It should probably be /var/apacheds/1.5.x/instanceN/partitions no?
Yes - Right - Something like this. Sorry I left the apacheds part out...
I think I'd probably leave the version out though if the idea
is to have a a ldap data repository that is cross version compatible...
Hmmm .... instanceN...this seems to imply multiple instances
of ADS (Same version) possible running...I thought the lock file made
sure only one instance could be run on a host?
Were you maybe thinking multiple instances of different version of
ADS?
That would probably throw a fork wrench in the idea of leaving the
version number out of the /var/apacheds/ location for the
ldap data repository.
I imagine though that most users would want a single version
installed, and then during an upgrade, they would just upgrade
and the new version uses the same repository.
It could be that the upgrade requires changes to the repository.
Like with subversion we have to do a dump, run some
shell script on the dump, and then put the result back.
>
> We should separate the data from different versions and different instances
> running off those versions?
That sounds smart.
So the actual ads partition repository is /var/apacheds/
I'm trying to understand the different instances part? Do
you mean that there are multiple instances of ADS running on the same host?
Cheers,
- Ole