Commit Graph

9111 Commits

Author SHA1 Message Date
Martin Babinsky
cd5fa38945 raise more descriptive Backend connection-related exceptions
https://fedorahosted.org/freeipa/ticket/5473

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-21 12:05:23 +01:00
Milan Kubík
aa648bcedc ipatests: replace the test-example.com domain in tests
Latest DNS patches introduced checks for the added zones.
If a zone exists, the add fails if not forced. The domain
test-example.com is resolvable thus causing errors in the test.

Also adds missing __init__.py to the ipatests.test_cmdline package.

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-17 15:15:28 +01:00
Petr Viktorin
53b60546e4 Package ipapython, ipalib, ipaplatform, ipatests for Python 3
Running make with PYTHON=/usr/bin/python3 will build/install the
bits for Python 3.

Executable scripts in ipatests have symlinks Python version suffixes
as per Fedora guidelines. Suffix-less names point to the Python 2 versions.

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-12-17 10:52:57 +01:00
Petr Spacek
58331208a5 dns: Handle SERVFAIL in check if domain already exists.
In cases where domain is already delegated to IPA prior installation
we might get timeout or SERVFAIL. The answer depends on the recursive
server we are using for the check.

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-12-16 15:25:53 +01:00
Jan Cholasta
c265e8736e ipautil: remove unused import causing cyclic import in tests
https://fedorahosted.org/freeipa/ticket/5551
2015-12-15 15:37:10 +01:00
Petr Vobornik
fbc7a6e5f5 Bump 4.4 development version to 4.3.90 2015-12-14 23:30:59 +01:00
Petr Vobornik
792c965075 Become IPA 4.3.0 2015-12-14 23:20:54 +01:00
David Kupka
1534061d9b dns: Add --auto-reverse option.
Introducing '--auto-reverse' option. When specified reverse records for
all server's IP addresses are checked and when record nor reverse zone
does not exist reverse zone is created.

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-12-14 18:53:53 +01:00
David Kupka
8d19da49c4 dns: Check if domain already exists.
Raise an error when the domain already exists. This can be overriden using
--force or --allow-zone-overlap options.

https://fedorahosted.org/freeipa/ticket/3681

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-12-14 18:53:53 +01:00
David Kupka
6c107d819c dns: do not add (forward)zone if it is already resolvable.
Check if the zone user wants to add is already resolvable and refuse to
create it if yes. --skip-overlap-check and --force options suppress this check.

https://fedorahosted.org/freeipa/ticket/5087

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-12-14 18:53:53 +01:00
Martin Babinsky
5886f87f97 ipa-client-install: create a temporary directory for ccache files
gssapi.Credentials instantiation in ipautil.kinit_keytab() raises 'Bad format
in credential cache' error when a name of an existing zero-length file is
passed as a ccache parameter. Use temporary directory instead and let GSSAPI
to create file-based ccache on demand.

https://fedorahosted.org/freeipa/ticket/5528

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 18:50:38 +01:00
Martin Babinsky
c4b9b295d8 CI tests: remove '-p' option from ipa-dns-install calls
fix for https://fedorahosted.org/freeipa/ticket/4933 made ipa-dns-install to
use LDAPI and deprecated -p option for directory manager password. This patche
remove the option from calls to ipa-dns-install in CI tests so that
deprecation warning does not clutter the logs.

Reviewed-By: Milan Kubik <mkubik@redhat.com>
2015-12-14 15:41:28 +01:00
Jan Cholasta
110e3dfc54 replica promotion: let ipa-client-install validate enrollment options
ipa-client-install output is redirected to standard output, so let it print
its own error message for missing options.

https://fedorahosted.org/freeipa/ticket/5542

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 15:38:32 +01:00
Martin Basti
4272ba40ea Explicitly call chmod on newly created directories
Without calling os.chmod(), umask is effective and may cause that
directory is created with permission that causes failure.

This can be related to https://fedorahosted.org/freeipa/ticket/5520

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:57:26 +01:00
Martin Basti
5e2cd38ab9 DNS: fix file permissions
With non default umask named-pkcs11 cannot access the softhsm token storage

https://fedorahosted.org/freeipa/ticket/5520

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:57:26 +01:00
Jan Cholasta
c856401478 server install: redirect ipa-client-install output to standard output
https://fedorahosted.org/freeipa/ticket/5527

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:46:45 +01:00
Jan Cholasta
f49cdfe392 ipautil: allow redirecting command output to standard output in run()
https://fedorahosted.org/freeipa/ticket/5527

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:46:45 +01:00
Jan Cholasta
b248dfda39 ca install: use host credentials in domain level 1
https://fedorahosted.org/freeipa/ticket/5399

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-14 14:40:17 +01:00
Jan Cholasta
6ea868e172 aci: merge domain and CA suffix replication agreement ACIs
Merge the two identical sets of replication agreement permission ACIs for
the domain and CA suffixes into a single set suitable for replication
agreements for both suffixes. This makes the replication agreement
permissions behave correctly during CA replica install, so that any
non-admin user with the proper permissions (such as members of the
ipaservers host group) can set up replication for the CA suffix.

https://fedorahosted.org/freeipa/ticket/5399

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-14 14:40:17 +01:00
Fraser Tweedale
38861428e7 dogtaginstance: remove unused function 'check_inst'
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:32:36 +01:00
Jan Cholasta
d68613194b replica promotion: notify user about ignoring client enrollment options
When IPA client is already installed, notify the user that the enrollment
options are ignored in ipa-replica-install.

https://fedorahosted.org/freeipa/ticket/5530

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:23:37 +01:00
Martin Basti
e1cb802d15 Tests: test_ipagetkeytab: fix assert that is always true
Fixes:
/usr/lib/python2.7/site-packages/ipatests/test_cmdline/test_ipagetkeytab.py:116:
SyntaxWarning: assertion is always true, perhaps remove parentheses?
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:22:30 +01:00
David Kupka
8b1002a18c spec file: Add dbus-python to BuildRequires
Commit 8d7f67e introduced the need for dbus-python during build time.

https://fedorahosted.org/freeipa/ticket/5497
2015-12-14 13:38:52 +01:00
Petr Spacek
e650e5eda1 Makefile: disable parallel build
IPA build system cannot cope with parallel build anyway, so this patch
disables parallel build explicitly so it does not blow up when user
has -j specified in default MAKEOPTS.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 12:33:34 +01:00
David Kupka
8112ac69cc test: Temporarily increase timeout in vault test.
Remove this change when vault is fixed.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-14 11:52:20 +01:00
Martin Basti
bf9a34f4cf Install RA cert during replica promotion
This cert is needed with KRA to be able store and retrieve secrets.

https://fedorahosted.org/freeipa/ticket/5512

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-12-14 11:48:40 +01:00
Petr Viktorin
099cf98307 Refactor ipautil.run
The ipautil.run function now returns an object with returncode and
output are accessible as attributes.

The stdout and stderr of all commands are logged (unless skip_output is given).

The stdout/stderr contents must be explicitly requested with a keyword
argument, otherwise they are None.
This is because in Python 3, the output needs to be decoded, and that can
fail if it's not decodable (human-readable) text.

The raw (bytes) output is always available from the result object,
as is "leniently" decoded output suitable for logging.

All calls are changed to reflect this.

A use of Popen in cainstance is changed to ipautil.run.

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-12-14 10:54:23 +01:00
Martin Babinsky
4cc206b0f8 prevent crashes of server uninstall check caused by failed LDAP connections
https://fedorahosted.org/freeipa/ticket/5409

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-11 19:22:31 +01:00
Gabe
5c9b9089b7 Migrate wget references and usage to curl
https://fedorahosted.org/freeipa/ticket/5458

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-11 18:46:10 +01:00
Jan Cholasta
14a44ea47b replica promotion: use host credentials for connection check
https://fedorahosted.org/freeipa/ticket/5497

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-11 18:44:13 +01:00
Jan Cholasta
8d7f67e08c replica install: add remote connection check over API
Add server_conncheck command which calls ipa-replica-conncheck --replica
over oddjob.

https://fedorahosted.org/freeipa/ticket/5497

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-11 18:44:13 +01:00
Jan Cholasta
00f591d4e9 build: put oddjob scripts into separate directory
https://fedorahosted.org/freeipa/ticket/5497

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-11 18:44:13 +01:00
Gabe
12e7f71600 ipa-replica-install prints incorrect error message when replica is already installed
https://fedorahosted.org/freeipa/ticket/5022
https://fedorahosted.org/freeipa/ticket/5320

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-12-11 18:24:42 +01:00
Tomas Babej
90f7fa074a replicainstall: Make sure the enrollment state is preserved
During the promote_check phase, the subsequent checks after the machine
is enrolled may cause the installation to abort, hence leaving it
enrolled even though it might not have been prior to the execution of
the ipa-replica-install command.

Make sure that ipa-client-install --uninstall is called on the machine
that has not been enrolled before in case of failure during the
promote_check phase.

https://fedorahosted.org/freeipa/ticket/5529

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-11 18:07:20 +01:00
Tomas Babej
c3c8651ac1 replicainstall: Add check for domain if server is specified
Avoids failing in the later stages during the ipa-client-install
command.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-11 17:21:14 +01:00
Jan Cholasta
e9baafb08f spec file: put Python modules into standalone packages
Make the following changes in packaging:

* freeipa-server - split off python2-ipaserver and freeipa-server-common,
* freeipa-server-dns - build as noarch,
* freeipa-client - split off python2-ipaclient and freeipa-client-common,
* freeipa-admintools - build as noarch,
* freeipa-python - split into python2-ipalib and freeipa-common, provide
  freeipa-python-compat for upgrades,
* freeipa-tests - rename to python2-ipatests and build as noarch.

Bump version to 4.2.91.

https://fedorahosted.org/freeipa/ticket/3197

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-11 15:17:41 +01:00
Jan Cholasta
f50b4647ba spec file: remove config files from freeipa-python
/etc/ipa/dnssec is now owned by freeipa-server. The remaining files are now
owned by freeipa-client.

https://fedorahosted.org/freeipa/ticket/3197

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-11 15:17:41 +01:00
Martin Basti
1e0f1f5197 CI: fix ipa-kra-install on domain level 1
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-11 15:11:20 +01:00
Tomas Babej
a02f83ff9c tests: Add hostmask detection for sudo rules validating on hostmask
IPA sudo tests worked under the assumption that the clients
that are executing the sudo commands have their IPs assigned
within 255.255.255.0 hostmask.

Removes this (invalid) assumption and adds a
dynamic detection of the hostmask of the IPA client.

https://fedorahosted.org/freeipa/ticket/5501

Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
2015-12-11 14:25:50 +01:00
Martin Babinsky
7c4ce9a098 fix error message assertion in negative forced client reenrollment tests
https://fedorahosted.org/freeipa/ticket/5511

Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2015-12-11 13:11:54 +01:00
Lenka Doudova
a66a2c5160 Adding descriptive IDs to stageuser tests
Adding descriptive IDs to parametrized stageuser test for better identification of test cases.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 12:34:17 +01:00
Martin Babinsky
e130d35687 add ACIs for custodia container to its parent during IPA upgrade
This fixes the situation when LDAPUpdater tries to add ACIs for storing
secrets in cn=custodia,cn=ipa,cn=etc,$SUFFIX before the container is actually
created leading to creation of container without any ACI and subsequent
erroneous behavior.

https://fedorahosted.org/freeipa/ticket/5524

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-12-11 12:25:26 +01:00
Jan Cholasta
ccb2f52313 server uninstall: ignore --ignore-topology-disconnect in domain level 0
Topology disconnect is always ignored in domain level 0, so the option can
be safely ignored.

https://fedorahosted.org/freeipa/ticket/5409

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 07:18:44 +01:00
Jan Cholasta
b4a78db4e7 replica promotion: check domain level before ipaservers membership
Check domain level before checking ipaservers membership to prevent
"not found" error when attempting replica promotion in domain level 0.

https://fedorahosted.org/freeipa/ticket/5401

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 07:11:46 +01:00
Jan Cholasta
8f36a5bd68 replica install: add ipaservers if it does not exist
This prevents crash when adding the host entry to ipaservers when
installing replica of a 4.2 or older server.

https://fedorahosted.org/freeipa/ticket/3416

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 07:11:46 +01:00
David Kupka
b7953cda4f replica: Fix ipa-replica-install with replica file (domain level 0).
Attribute _ca_enabled is set in promote_check() and is not available in
install(). When installing replica in domain level 0 we can determine existence
of CA service based on existence of cacert.p12 file in provided replica-file.

https://fedorahosted.org/freeipa/ticket/5531

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-10 07:49:53 +01:00
Tomas Babej
dcb5c2a520 topology: Fix: Make sure the old 'realm' topology suffix is not used
The old 'realm' topology suffix is no longer used, howver, it was being
created on masters with version 4.2.3 and later. Make sure it's properly
removed.

Note that this is not the case for the 'ipaca' suffix, whic was later
removed to 'ca'.

https://fedorahosted.org/freeipa/ticket/5526

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-09 18:57:52 +01:00
Jan Cholasta
faf6085564 replica promotion: allow OTP bulk client enrollment
https://fedorahosted.org/freeipa/ticket/5498

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-09 10:16:32 +01:00
Tomas Babej
a84b7d2117 topology: Make sure the old 'realm' topology suffix is not used
The old 'realm' topology suffix is no longer used, however, it was being
created on masters with version 4.2.3 and later. Make sure it's properly
removed.

Note that this is not the case for the 'ipaca' suffix, which was later
removed to 'ca'.

https://fedorahosted.org/freeipa/ticket/5526

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-09 09:42:18 +01:00
Martin Babinsky
35fae355cc CI tests: ignore disconnected domain level 1 topology on IPA master teardown
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-09 09:39:20 +01:00