9cfcbc6 dnssec: fix ipa-ods-exporter crash when master key missing

1 file Authored by frenaud 3 years ago, Committed by abbra 3 years ago,
    dnssec: fix ipa-ods-exporter crash when master key missing
    
    When a master key is missing from the local HSM, ipa-ods-exporter crashes.
    This can happen when the DNSSEC master role is moved from one node to
    another with the following scenario:
    - install server1 with dns + dnssec
    - install server2 without dns
    - disable dnssec from server1
    - install dns + dnssec on server2
    
    With the above scenario, server2 never had the opportunity to get
    the master key (this happens only when the replica is already
    configured as DNS server and has put its public replica key in LDAP +
    the current DNSSEC master wraps its master key with the replica key).
    
    ipa-ods-exporter can only log an error instead of crashing.
    
    Related: https://pagure.io/freeipa/issue/8654
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>