[389-devel] Re: Questions related to lib389 issue #1 cn=config

2017-03-15 Thread William Brown
On Wed, 2017-03-15 at 12:50 +0530, Ankit Yadav wrote:
> I have uninstalled that package.
> There were some issues with my installation but now I am getting some
> different errors.
> 

That means you already have the instance of that name: The error is
still a bit rough.

Try:

sudo /sbin/remove-ds.pl -i slapd-standalone

Then run the test again. 

-- 
Sincerely,

William Brown
Software Engineer
Red Hat, Australia/Brisbane



signature.asc
Description: This is a digitally signed message part
___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org


[389-devel] Re: Questions related to lib389 issue #1 cn=config

2017-03-15 Thread Ankit Yadav
I have fixed the issues with my installation hence now I am getting the
above error.

Regards,
Ankit yadav.

On 15 March 2017 at 12:50, Ankit Yadav  wrote:

> I have uninstalled that package.
> There were some issues with my installation but now I am getting some
> different errors.
>
> = error starts
> =
> lib389/instance/setup.py:287: in create_from_args
> self._prepare_ds(general, slapd, backends)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> self = , general =
> {'config_version': 2, 'defaults': '9', 'full_machine_name':
> 'localhost.localdomain', 'selinux': True, ...}
> slapd = {'backup_dir': '/var/lib/dirsrv/slapd-standalone/bak', 'bin_dir':
> '/usr/bin', 'cert_dir': '/etc/dirsrv/slapd-standalone', 'config_dir':
> '/etc/dirsrv/slapd-standalone', ...}
> backends = {}
>
> def _prepare_ds(self, general, slapd, backends):
>
> assert(general['defaults'] is not None)
> if self.verbose:
> self.log.info("PASSED: using config settings %s" %
> general['defaults'])
> # Validate our arguments.
> assert(slapd['user'] is not None)
> # check the user exists
> assert(pwd.getpwnam(slapd['user']))
> slapd['user_uid'] = pwd.getpwnam(slapd['user']).pw_uid
> assert(slapd['group'] is not None)
> assert(grp.getgrnam(slapd['group']))
> slapd['group_gid'] = grp.getgrnam(slapd['group']).gr_gid
> # check this group exists
> # Check that we are running as this user / group, or that we are
> root.
> assert(os.geteuid() == 0 or getpass.getuser() == slapd['user'])
>
> if self.verbose:
> self.log.info("PASSED: user / group checking")
>
> assert(general['full_machine_name'] is not None)
> assert(general['strict_host_checking'] is not None)
> if general['strict_host_checking'] is True:
> # Check it resolves with dns
> assert(socket.gethostbyname(general['full_machine_name']))
> if self.verbose:
> self.log.info("PASSED: Hostname strict checking")
>
> assert(slapd['prefix'] is not None)
> if (slapd['prefix'] != ""):
> assert(os.path.exists(slapd['prefix']))
> if self.verbose:
> self.log.info("PASSED: prefix checking")
>
> # We need to know the prefix before we can do the instance checks
> assert(slapd['instance_name'] is not None)
> # Check if the instance exists or not.
> # Should I move this import? I think this prevents some recursion
> from lib389 import DirSrv
> ds = DirSrv(verbose=self.verbose)
> ds.containerised = self.containerised
> ds.prefix = slapd['prefix']
> insts = ds.list(serverid=slapd['instance_name'])
> >   assert(len(insts) == 0)
> E   assert 1 == 0
> E+  where 1 = len([{'CONFIG_DIR': '/etc/dirsrv/slapd-standalone',
> 'DS_ROOT': '', 'INST_DIR': '/var/lib/dirsrv/slapd-standalone',
> 'PRODUCT_NAME': 'slapd', ...}])
>
> lib389/instance/setup.py:234: AssertionError
> ==
> 1 error in 0.18 seconds ==
> =
>
> I removed all the instances of directory servers.
>
> On 15 March 2017 at 09:11, William Brown  wrote:
>
>> On Wed, 2017-03-15 at 03:37 +, Ankit Yadav wrote:
>> > output of rpm -qa | grep lib389 ==> python-lib389-1.0.2-3.fc25.noarch
>>
>> You should erase this package, it's probably the source of some of your
>> issues.
>>
>>
>> > pid = pid_from_file(self.ds_paths.pid_file)
>> > lib389/paths.py:153: in __getattr__
>>
>> ...
>>
>> > except KeyError:
>> > >   raise NoOptionError(option, section)
>> > E   NoOptionError: No option 'pid_file' in section: 'slapd'
>>
>>
>> This means you are missing defaults.inf. Have you actually installed
>> 389-ds-base on your system?
>>
>> --
>> Sincerely,
>>
>> William Brown
>> Software Engineer
>> Red Hat, Australia/Brisbane
>>
>>
>> ___
>> 389-devel mailing list -- 389-devel@lists.fedoraproject.org
>> To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org
>>
>>
>
___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org


[389-devel] Re: Questions related to lib389 issue #1 cn=config

2017-03-15 Thread Ankit Yadav
I have uninstalled that package.
There were some issues with my installation but now I am getting some
different errors.

= error starts
=
lib389/instance/setup.py:287: in create_from_args
self._prepare_ds(general, slapd, backends)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , general =
{'config_version': 2, 'defaults': '9', 'full_machine_name':
'localhost.localdomain', 'selinux': True, ...}
slapd = {'backup_dir': '/var/lib/dirsrv/slapd-standalone/bak', 'bin_dir':
'/usr/bin', 'cert_dir': '/etc/dirsrv/slapd-standalone', 'config_dir':
'/etc/dirsrv/slapd-standalone', ...}
backends = {}

def _prepare_ds(self, general, slapd, backends):

assert(general['defaults'] is not None)
if self.verbose:
self.log.info("PASSED: using config settings %s" %
general['defaults'])
# Validate our arguments.
assert(slapd['user'] is not None)
# check the user exists
assert(pwd.getpwnam(slapd['user']))
slapd['user_uid'] = pwd.getpwnam(slapd['user']).pw_uid
assert(slapd['group'] is not None)
assert(grp.getgrnam(slapd['group']))
slapd['group_gid'] = grp.getgrnam(slapd['group']).gr_gid
# check this group exists
# Check that we are running as this user / group, or that we are
root.
assert(os.geteuid() == 0 or getpass.getuser() == slapd['user'])

if self.verbose:
self.log.info("PASSED: user / group checking")

assert(general['full_machine_name'] is not None)
assert(general['strict_host_checking'] is not None)
if general['strict_host_checking'] is True:
# Check it resolves with dns
assert(socket.gethostbyname(general['full_machine_name']))
if self.verbose:
self.log.info("PASSED: Hostname strict checking")

assert(slapd['prefix'] is not None)
if (slapd['prefix'] != ""):
assert(os.path.exists(slapd['prefix']))
if self.verbose:
self.log.info("PASSED: prefix checking")

# We need to know the prefix before we can do the instance checks
assert(slapd['instance_name'] is not None)
# Check if the instance exists or not.
# Should I move this import? I think this prevents some recursion
from lib389 import DirSrv
ds = DirSrv(verbose=self.verbose)
ds.containerised = self.containerised
ds.prefix = slapd['prefix']
insts = ds.list(serverid=slapd['instance_name'])
>   assert(len(insts) == 0)
E   assert 1 == 0
E+  where 1 = len([{'CONFIG_DIR': '/etc/dirsrv/slapd-standalone',
'DS_ROOT': '', 'INST_DIR': '/var/lib/dirsrv/slapd-standalone',
'PRODUCT_NAME': 'slapd', ...}])

lib389/instance/setup.py:234: AssertionError
==
1 error in 0.18 seconds
===

I removed all the instances of directory servers.

On 15 March 2017 at 09:11, William Brown  wrote:

> On Wed, 2017-03-15 at 03:37 +, Ankit Yadav wrote:
> > output of rpm -qa | grep lib389 ==> python-lib389-1.0.2-3.fc25.noarch
>
> You should erase this package, it's probably the source of some of your
> issues.
>
>
> > pid = pid_from_file(self.ds_paths.pid_file)
> > lib389/paths.py:153: in __getattr__
>
> ...
>
> > except KeyError:
> > >   raise NoOptionError(option, section)
> > E   NoOptionError: No option 'pid_file' in section: 'slapd'
>
>
> This means you are missing defaults.inf. Have you actually installed
> 389-ds-base on your system?
>
> --
> Sincerely,
>
> William Brown
> Software Engineer
> Red Hat, Australia/Brisbane
>
>
> ___
> 389-devel mailing list -- 389-devel@lists.fedoraproject.org
> To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org
>
>
___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org