RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1979426 - FRR: Unable to configure OSPF in multi-instance mode
Summary: FRR: Unable to configure OSPF in multi-instance mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: frr
Version: 8.4
Hardware: All
OS: Linux
high
medium
Target Milestone: beta
: ---
Assignee: Michal Ruprich
QA Contact: František Hrdina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-06 02:01 UTC by suresh kumar
Modified: 2022-05-10 13:58 UTC (History)
1 user (show)

Fixed In Version: frr-7.5-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 13:36:44 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2022:1778 0 None None None 2022-05-10 13:36:59 UTC

Description suresh kumar 2021-07-06 02:01:59 UTC
Description of problem:
Unable to configure ospf instances in multi-instance mode

Version-Release number of selected component (if applicable):

frr-7.5-4.el8.x86_64

How reproducible:

Always


Steps to Reproduce:

1. configure frr with below lines in /etc/frr/daemons

     ospfd=yes
     ospfd_instances=1,2

2. Start frr daemon

3. configure ospf

  # configure t
  # router ospf 2
  # ospf router-id 1.2.3.4

Actual results:

# sh ru
Building configuration...

Current configuration:
!
frr version 7.5
frr defaults traditional
hostname localhost.localdomain
no ip forwarding
no ipv6 forwarding
no service integrated-vtysh-config
!
line vty
!
end


Expected results:

# sh ru
Building configuration...

Current configuration:
!
frr version 7.5
frr defaults traditional
hostname localhost.localdomain
no ip forwarding
no ipv6 forwarding
no service integrated-vtysh-config
!
router ospf 1
!
router ospf 2
 ospf router-id 1.2.3.4
!
line vty
!
end



Additional info:

While writing the configuration, it says:

onfiguration saved to /etc/frr/zebra.conf
Configuration saved to /etc/frr/ospfd-1.conf
Configuration saved to /etc/frr/ospfd-2.conf
Configuration saved to /etc/frr/staticd.conf


but ospfd*.conf has only default lines.

# cat ospfd-2.conf
!
! Zebra configuration saved from vty
!   2021/07/05 21:23:23
!
frr version 7.5
frr defaults traditional
!
hostname localhost.localdomain
!
!
!
!
!
!
!
line vty
!



This issue was observed while upgrading RHEL8 where the frr package got updated from 7.0  to 7.5.


Below commit solves the issue. Tested on both customer and local environment

commit e4f632caec8641278ee2e583445f3176e949e1f4
Author: Igor Ryzhov <iryzhov>
Date:   Wed Dec 2 03:36:10 2020 +0300

    ospf: fix instance initialization when using multi-instance mode
    
    OSPF instance initialization was moved from "router ospf" vty command to
    ospf_get function some time ago but the same thing must be done in
    ospf_get_instance function used when multi-instance mode is enabled.
    
    Signed-off-by: Igor Ryzhov <iryzhov>

diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index d7c4e108c..3ca9453bc 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -377,12 +377,50 @@ struct ospf *ospf_lookup_by_inst_name(unsigned short instance, const char *name)
        return NULL;
 }
 
-struct ospf *ospf_get(unsigned short instance, const char *name, bool *created)
+static void ospf_init(struct ospf *ospf)
 {
-       struct ospf *ospf;
        struct vrf *vrf;
        struct interface *ifp;
 
+       ospf_opaque_type11_lsa_init(ospf);
+
+       if (ospf->vrf_id != VRF_UNKNOWN)
+               ospf->oi_running = 1;
+
+       /* Activate 'ip ospf area x' configured interfaces for given
+        * vrf. Activate area on vrf x aware interfaces.
+        * vrf_enable callback calls router_id_update which
+        * internally will call ospf_if_update to trigger
+        * network_run_state
+        */
+       vrf = vrf_lookup_by_id(ospf->vrf_id);
+
+       FOR_ALL_INTERFACES (vrf, ifp) {
+               struct ospf_if_params *params;
+               struct route_node *rn;
+               uint32_t count = 0;
+
+               params = IF_DEF_PARAMS(ifp);
+               if (OSPF_IF_PARAM_CONFIGURED(params, if_area))
+                       count++;
+
+               for (rn = route_top(IF_OIFS_PARAMS(ifp)); rn; rn = route_next(rn))
+                       if ((params = rn->info) && OSPF_IF_PARAM_CONFIGURED(params, if_area))
+                               count++;
+
+               if (count > 0) {
+                       ospf_interface_area_set(ospf, ifp);
+                       ospf->if_ospf_cli_count += count;
+               }
+       }
+
+       ospf_router_id_update(ospf);
+}
+
+struct ospf *ospf_get(unsigned short instance, const char *name, bool *created)
+{
+       struct ospf *ospf;
+
        /* vrf name provided call inst and name based api
         * in case of no name pass default ospf instance */
        if (name)
@@ -395,39 +433,7 @@ struct ospf *ospf_get(unsigned short instance, const char *name, bool *created)
                ospf = ospf_new(instance, name);
                ospf_add(ospf);
 
-               ospf_opaque_type11_lsa_init(ospf);
-
-               if (ospf->vrf_id != VRF_UNKNOWN)
-                       ospf->oi_running = 1;
-
-               /* Activate 'ip ospf area x' configured interfaces for given
-                * vrf. Activate area on vrf x aware interfaces.
-                * vrf_enable callback calls router_id_update which
-                * internally will call ospf_if_update to trigger
-                * network_run_state
-                */
-               vrf = vrf_lookup_by_id(ospf->vrf_id);
-
-               FOR_ALL_INTERFACES (vrf, ifp) {
-                       struct ospf_if_params *params;
-                       struct route_node *rn;
-                       uint32_t count = 0;
-
-                       params = IF_DEF_PARAMS(ifp);
-                       if (OSPF_IF_PARAM_CONFIGURED(params, if_area))
-                               count++;
-
-                       for (rn = route_top(IF_OIFS_PARAMS(ifp)); rn; rn = route_next(rn))
-                               if ((params = rn->info) && OSPF_IF_PARAM_CONFIGURED(params, if_area))
-                                       count++;
-
-                       if (count > 0) {
-                               ospf_interface_area_set(ospf, ifp);
-                               ospf->if_ospf_cli_count += count;
-                       }
-               }
-
-               ospf_router_id_update(ospf);
+               ospf_init(ospf);
        }
 
        return ospf;
@@ -443,7 +449,7 @@ struct ospf *ospf_get_instance(unsigned short instance, bool *created)
                ospf = ospf_new(instance, NULL /* VRF_DEFAULT*/);
                ospf_add(ospf);
 
-               ospf_opaque_type11_lsa_init(ospf);
+               ospf_init(ospf);
        }
 
        return ospf;
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index dba7ee8c3..b18484ef4 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -556,7 +556,6 @@ extern int ospf_nbr_nbma_poll_interval_set(struct ospf *, struct in_addr,
                                           unsigned int);
 extern int ospf_nbr_nbma_poll_interval_unset(struct ospf *, struct in_addr);
 extern void ospf_prefix_list_update(struct prefix_list *);
-extern void ospf_init(void);
 extern void ospf_if_update(struct ospf *, struct interface *);
 extern void ospf_ls_upd_queue_empty(struct ospf_interface *);
 extern void ospf_terminate(void);

Comment 13 errata-xmlrpc 2022-05-10 13:36:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (frr bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1778


Note You need to log in before you can comment on or make changes to this bug.