Closed Dan33l closed 4 years ago
Running the following command fail :
/usr/sbin/ipa-server-install --hostname=ipa1.example.lan ...
What was the docker run
command and how did not run that /usr/sbin/ipa-server-install
in the container? Via docker exec
?
This is via Puppet during acceptance test The Puppet code tested is here : https://gitlab.adullact.net/adullact/puppet-freeipa/blob/master/manifests/install/server/master.pp#L12
Beaker is used for provisioning : https://github.com/puppetlabs/beaker-docker/blob/master/lib/beaker/hypervisor/docker.rb
Edit:: the current acceptance tests are using VMs. But i would like to switch to Docker because containers are less resource consuming
What set of docker commands does it all translate to?
The generated Dockerfile is :
FROM centos:7
ENV container docker
RUN yum clean all
RUN yum install -y sudo openssh-server openssh-clients curl ntpdate
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN mkdir -p /var/run/sshd
RUN echo root:#{root_password} | chpasswd
RUN sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
RUN sed -ri 's/^#?UseDNS .*/UseDNS no/' /etc/ssh/sshd_config
RUN cp /bin/true /sbin/agetty
RUN yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which ss
EXPOSE 22
CMD ["/sbin/init"]
That Dockerfile does not seem to have anything about FreeIPA server in it ... so I'm not sure how it's relevant.
Or do you say that you run container from this container and then in it you install freeipa-server-dns
manually via yum
and then run /usr/sbin/ipa-server-install
? In that case you might want to compare it to the Dockerfile.centos-7
in this repository so see how the setup provided here differs.
After the container is launched via this Dockerfile generated by Beaker, a helper provided by Beaker install a puppet
binary. And then, Beaker apply this puppet code in the container:
https://gitlab.adullact.net/adullact/puppet-freeipa/blob/master/spec/acceptance/01_freeipa_spec.rb#L10
And this /usr/sbin/ipa-server-install
command , embedded in the Puppet code, is executed:
https://gitlab.adullact.net/adullact/puppet-freeipa/blob/master/manifests/install/server/master.pp#L13
And it is this /usr/sbin/ipa-server-install
command that fail.
Since the container image is not the one from this repository, I suggest bringing this issue to https://gitlab.adullact.net/adullact/puppet-freeipa. The puppet-freeipa developers will have much better idea than people using this repo what they do and don't do in that container, and will be able to reproduce and debug the issue in detail.
Humm i am maintainer of puppet-freeipa
module.
I created an issue here, as suggested in IRC channel #freeipa, to get some help to understand why the named process refuse to start in our Docker environment.
Probably a requirement is not present, but i was not able to find which one.
Edit : On a true VM, all works as expected.
On Fedora 31 host with moby-engine-18.09.8-2.ce.git0dd43dd.fc31.x86_64, when I run
host# docker run --name=ipa -h ipa1.example.lan --tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro --rm -ti registry.centos.org/centos:7 /usr/sbin/init
and then in another terminal
host# docker exec -ti ipa bash
[root@ipa1 /]# yum install -y ipa-server-dns
[...]
[root@ipa1 /]# ipa-server-install --realm=EXAMPLE.LAN --domain=example.lan --admin-password='s^ecr@et.ea;R/O*=?j!.QsAu+$' --ds-password='s^ecr@et.ea;R/O*=?j!.QsAu+$' --setup-dns --auto-reverse --no-forwarders --idstart=10000 --unattended
in passes up to
[6/7]: creating replica keys
[7/7]: configuring ipa-dnskeysyncd to start on boot
Done configuring DNS key synchronization service (ipa-dnskeysyncd).
Restarting ipa-dnskeysyncd
Restarting named
Updating DNS system records
Configuring client side components
Using existing certificate '/etc/ipa/ca.crt'.
Client hostname: ipa1.example.lan
Realm: EXAMPLE.LAN
DNS Domain: example.lan
IPA Server: ipa1.example.lan
BaseDN: dc=example,dc=lan
Skipping synchronizing time with NTP server.
New SSSD config will be created
Configured sudoers in /etc/nsswitch.conf
Configured /etc/sssd/sssd.conf
trying https://ipa1.example.lan/ipa/json
[try 1]: Forwarding 'schema' to json server 'https://ipa1.example.lan/ipa/json'
trying https://ipa1.example.lan/ipa/session/json
[try 1]: Forwarding 'ping' to json server 'https://ipa1.example.lan/ipa/session/json'
[try 1]: Forwarding 'ca_is_enabled' to json server 'https://ipa1.example.lan/ipa/session/json'
Systemwide CA database updated.
SSSD enabled
Configured /etc/openldap/ldap.conf
/etc/ssh/ssh_config not found, skipping configuration
/etc/ssh/sshd_config not found, skipping configuration
Configuring example.lan as NIS domain.
Command '/bin/systemctl restart rhel-domainname.service' returned non-zero exit status 1
The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information
I'd recommend starting your investigation with that, with as little things and as little options as possible.
Are there any news about solving this problem ?
It seemed that the OP was in 2019 using some setup from some other git repository but he did not show the exact docker run
that he's using. So there really isn't a "this problem" to solve, at least not one related to this repository.
If you are hitting a specific problem while using this specific repo or images built from it, please open a new issue describing your specific situation.
For testing purpose, i am trying to install FreeIPA using docker (
docker-ce 5:19.03.5~3-0~ubuntu-bionic
) on Ubuntu 18.04 host with CentOS 7 docker image5e35e350aded
.Running the following command fail :
/usr/sbin/ipa-server-install --hostname=ipa1.example.lan --realm=EXAMPLE.LAN --domain=example.lan --admin-password='s^ecr@et.ea;R/O*=?j!.QsAu+$' --ds-password='s^ecr@et.ea;R/O*=?j!.QsAu+$' --setup-dns --auto-reverse --no-forwarders --ip-address 172.17.0.2 --idstart=10000 --unattended
The output of the command:
The log file
/var/log/ipaserver-install.log
contains:The systemd journal:
FreeIPA version:
SELinux: