freeipa-container: Installation fails on kubernetes

We are having trouble getting FreeIPA up and running in Kubernetes. We are getting the below error. I will try to add some configuration information for k8s below shortly, but wondered if anyone had seen this issue before.

ue Dec  5 02:27:19 UTC 2017 /usr/sbin/ipa-server-configure-first 

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the FreeIPA Server.

This includes:
  * Configure a stand-alone CA (dogtag) for certificate management
  * Configure the Network Time Daemon (ntpd)
  * Create and configure an instance of Directory Server
  * Create and configure a Kerberos Key Distribution Center (KDC)
  * Configure Apache (httpd)


The IPA Master Server will be configured with:
Hostname:       ipa-0.ipa.default.svc.cluster.local
IP address(es): 100.96.11.81
Domain name:    example.tech
Realm name:     example.tech

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Done configuring NTP daemon (ntpd).
Configuring directory server (dirsrv). Estimated time: 1 minute
  [1/47]: creating directory server user
  [2/47]: creating directory server instance
  [3/47]: updating configuration in dse.ldif
  [4/47]: restarting directory server
  [5/47]: adding default schema
  [6/47]: enabling memberof plugin
  [7/47]: enabling winsync plugin
  [8/47]: configuring replication version plugin
  [9/47]: enabling IPA enrollment plugin
  [10/47]: enabling ldapi
  [11/47]: configuring uniqueness plugin
  [12/47]: configuring uuid plugin
  [13/47]: configuring modrdn plugin
  [14/47]: configuring DNS plugin
  [15/47]: enabling entryUSN plugin
  [16/47]: configuring lockout plugin
  [17/47]: configuring topology plugin
  [18/47]: creating indices
  [19/47]: enabling referential integrity plugin
  [20/47]: configuring certmap.conf
  [21/47]: configure autobind for root
  [22/47]: configure new location for managed entries
  [23/47]: configure dirsrv ccache
  [24/47]: enabling SASL mapping fallback
  [25/47]: restarting directory server
  [26/47]: adding sasl mappings to the directory
  [27/47]: adding default layout
  [28/47]: adding delegation layout
  [29/47]: creating container for managed entries
  [30/47]: configuring user private groups
  [31/47]: configuring netgroups from hostgroups
  [32/47]: creating default Sudo bind user
  [33/47]: creating default Auto Member layout
  [34/47]: adding range check plugin
  [35/47]: creating default HBAC rule allow_all
  [36/47]: adding sasl mappings to the directory
  [37/47]: adding entries for topology management
  [38/47]: initializing group membership
  [39/47]: adding master entry
  [40/47]: initializing domain level
  [41/47]: configuring Posix uid/gid generation
  [42/47]: adding replication acis
  [43/47]: enabling compatibility plugin
  [44/47]: activating sidgen plugin
  [45/47]: activating extdom plugin
  [46/47]: tuning directory server
  [47/47]: configuring directory to start on boot
Done configuring directory server (dirsrv).
Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes 30 seconds
  [1/31]: creating certificate server user
  [2/31]: configuring certificate server instance
  [3/31]: stopping certificate server instance to update CS.cfg
  [4/31]: backing up CS.cfg
  [5/31]: disabling nonces
  [6/31]: set up CRL publishing
  [7/31]: enable PKIX certificate path discovery and validation
  [8/31]: starting certificate server instance
  [9/31]: creating RA agent certificate database
  [10/31]: importing CA chain to RA certificate database
  [11/31]: fixing RA database permissions
  [12/31]: setting up signing cert profile
  [13/31]: setting audit signing renewal to 2 years
  [14/31]: restarting certificate server
  [15/31]: requesting RA certificate from CA
  [16/31]: issuing RA agent certificate
  [17/31]: adding RA agent as a trusted user
  [18/31]: authorizing RA to modify profiles
  [19/31]: authorizing RA to manage lightweight CAs
  [20/31]: Ensure lightweight CAs container exists
  [21/31]: configure certmonger for renewals
  [22/31]: configure certificate renewals
  [error] DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
FreeIPA server configuration failed.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 27

Most upvoted comments

The following YAML should get you started, it works for me with Kubernetes master branch:

apiVersion: v1
kind: Secret
metadata:
  name: freeipa-server-password
stringData:
  admin.password: Secret123
---
apiVersion: v1
kind: Service
metadata:
  name: freeipa-server-service
spec:
  selector:
    app: freeipa-server
  clusterIP: 10.254.0.100
  ports:
  - name: http
    port: 80
    targetPort: 80
  - name: https
    port: 443
    targetPort: 443
  - name: dns-udp
    port: 53
    protocol: UDP
    targetPort: 53
  - name: kerberos-tcp
    port: 88
    protocol: TCP
    targetPort: 88
  - name: kerberos-udp
    port: 88
    protocol: UDP
    targetPort: 88
---
apiVersion: v1
kind: Pod
metadata:
  name: freeipa-server
  labels:
    app: freeipa-server
  annotations:
    seccomp.security.alpha.kubernetes.io/pod: docker/default
spec:
  restartPolicy: Never
  containers:
  - name: freeipa-server
    image: freeipa/freeipa-server:fedora-26
    volumeMounts:
    - name: freeipa-server-data
      mountPath: /data
    ports:
    - containerPort: 80
      protocol: TCP
    - containerPort: 443
      protocol: TCP
    - containerPort: 53
      protocol: UDP
    - containerPort: 88
      protocol: TCP
    - containerPort: 88
      protocol: UDP
    env:
    - name: IPA_SERVER_HOSTNAME
      value: ipa.example.test
    - name: PASSWORD
      valueFrom:
        secretKeyRef:
          name: freeipa-server-password
          key: admin.password
    - name: IPA_SERVER_INSTALL_OPTS
      value: "-U -r EXAMPLE.TEST --setup-dns --no-forwarders --no-ntp"
    readinessProbe:
      exec:
        command: [ "/usr/bin/systemctl", "status", "ipa" ]
      initialDelaySeconds: 60
      timeoutSeconds: 10
      periodSeconds: 10
      successThreshold: 1
      failureThreshold: 3
  volumes:
  - name: freeipa-server-data
    hostPath:
      path: /opt/freeipa-server

No, this is a Kubernetes issue only. We are working around this by using Docker. CentOS 7 is our current testing platform and that is raising the issues. Seems that the use of systemd is the crux, if it is possible to restructure following best practice and put each process inside it’s own container inside the same Pod in Kubernetes then we would not need to mess with systemd and unusual container privileges.