ConfD User Community

Getting Error:Unknown type in namespace

Hi ,
I have installed confd-7.6 on x86.
when i am trying to run confd using the command like: confd -c confd.conf --foreground --verbose
I am getting error like:
Failed to load file /etc/confd/o-ran-interfaces.fxs: interface-ref: Unknown type in namespace ‘urn:ietf:params:xml:ns:yang:ietf-interfaces’
“Failed to load file /etc/confd/o-ran-interfaces.fxs: interface-ref: Unknown type in namespace ‘urn:ietf:params:xml:ns:yang:ietf-interfaces’\n”
Strange part is:ietf-interfaces.yang already being loaded.Which can be verified from below log:
Console Log:

9-Dec-2021::15:54:27.085 rimpcie-4 confd[23897]: - Daemon logging started
9-Dec-2021::15:54:27.094 rimpcie-4 confd[23897]: confd embedded apps in early_phase0:
[]
9-Dec-2021::15:54:27.107 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-wg4-features.fxs
9-Dec-2021::15:54:27.107 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-crypto-types.fxs
9-Dec-2021::15:54:27.109 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-compression-factors.fxs
9-Dec-2021::15:54:27.109 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-ald-port.fxs
9-Dec-2021::15:54:27.110 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-subscribed-notifications.fxs
9-Dec-2021::15:54:27.113 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-origin.fxs
9-Dec-2021::15:54:27.113 rimpcie-4 confd[23897]: - Loading file /etc/confd/iana-hardware.fxs
9-Dec-2021::15:54:27.114 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-interfaces.fxs
9-Dec-2021::15:54:27.114 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-netconf-monitoring.fxs
9-Dec-2021::15:54:27.116 rimpcie-4 confd[23897]: - Loading file /etc/confd/tailf-common-monitoring.fxs
9-Dec-2021::15:54:27.116 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-netconf-acm.fxs
9-Dec-2021::15:54:27.117 rimpcie-4 confd[23897]: - Loading file /etc/confd/tailf-rollback.fxs
9-Dec-2021::15:54:27.118 rimpcie-4 confd[23897]: - Loading file /etc/confd/tailf-common-query.fxs
9-Dec-2021::15:54:27.119 rimpcie-4 confd[23897]: - Loading file /etc/confd/tailf-netconf-transactions.fxs
9-Dec-2021::15:54:27.119 rimpcie-4 confd[23897]: - Loading file /etc/confd/tailf-common.fxs
9-Dec-2021::15:54:27.120 rimpcie-4 confd[23897]: - Loading file /etc/confd/tailf-progress.fxs
9-Dec-2021::15:54:27.121 rimpcie-4 confd[23897]: - Loading file /etc/confd/iana-crypt-hash.fxs
9-Dec-2021::15:54:27.122 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-file-management.fxs
9-Dec-2021::15:54:27.123 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-hardware.fxs
9-Dec-2021::15:54:27.125 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-module-cap.fxs
9-Dec-2021::15:54:27.127 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-supervision.fxs
9-Dec-2021::15:54:27.128 rimpcie-4 confd[23897]: - Loading file /etc/confd/ietf-ip.fxs
9-Dec-2021::15:54:27.128 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-hardware.fxs
9-Dec-2021::15:54:27.130 rimpcie-4 confd[23897]: - Loading file /etc/confd/o-ran-interfaces.fxs
9-Dec-2021::15:54:27.130 rimpcie-4 confd[23897]: - Failed to load file /etc/confd/o-ran-interfaces.fxs: interface-ref: Unknown type in namespace ‘urn:ietf:params:xml:ns:yang:ietf-interfaces’
“Failed to load file /etc/confd/o-ran-interfaces.fxs: interface-ref: Unknown type in namespace ‘urn:ietf:params:xml:ns:yang:ietf-interfaces’\n”

o-ran-interfaces.yang

module o-ran-interfaces {
yang-version 1.1;
namespace "urn:o-ran:interfaces:1.0";
prefix "o-ran-int";


import ietf-inet-types {
prefix "inet";
}

 import iana-if-type {
 prefix "ianaift";
}

import ietf-interfaces {
prefix "if";
}

import ietf-ip {
prefix "IP";
}
 }

    augment "/if:interfaces/if:interface" {
      when "if:type = 'ianaift:l2vlan'";
description "augments for VLAN definition";
leaf base-interface {
  type if:interface-ref;
  must "/if:interfaces/if:interface[if:name = current()]"
        + "/o-ran-int:vlan-tagging = 'true'" {
    description
      "The base interface must have VLAN tagging enabled.";
  }
  description
    "The base interface for the VLAN sub-interafce.";
}
leaf vlan-id {
  type uint16 {
    range "1..4094";
  }
  description
    "The VLAN-ID.";
}
}

ietf-interfaces.yang:

   typedef interface-ref {
     type leafref {
      path "/if:interfaces/if:interface/if:name";
     }
description
  "This type is used by data models that need to reference
   interfaces.";
 }

I am not able to proceed futher.Please if can figure out the root cause,then really helpful.

Regards,
Biswajit

How did you compile the module ietf-interfaces? The type interface-ref is there and in my environment I can refer it from other modules without any problems.