inex / IXP-Manager

Full stack web application powering peering at over 200 Internet Exchange Points (IXPs) globally.
https://www.ixpmanager.org/
GNU General Public License v2.0
379 stars 164 forks source link

MAC Addresses Discovered Addresses: repeated interfaces and incorrect IPv6 addresses #765

Closed 0xmc closed 2 years ago

0xmc commented 2 years ago
ISSUE TYPE

Bug Report

OS
Ubuntu 20.04.3 LTS \n \l
VERSION
define( 'APPLICATION_VERSION', '6.2.0' );
define( 'APPLICATION_VERDATE', '2021111400' );
ENVIRONMENT
# php -v
PHP 8.0.14 (cli) (built: Dec 20 2021 21:22:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.14, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.14, Copyright (c), by Zend Technologies
# dpkg -l | grep php
ii  libapache2-mod-php8.0                8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php-common                           2:90+ubuntu20.04.1+deb.sury.org+1                                   all          Common files for PHP packages
ii  php-composer-ca-bundle               1.2.6-1                                                             all          utility library to find a path to the system CA bundle
ii  php-composer-semver                  1.5.1-1                                                             all          utilities, version constraint parsing and validation
ii  php-composer-spdx-licenses           1.5.3-1                                                             all          SPDX licenses list and validation library
ii  php-composer-xdebug-handler          1.4.0-1                                                             all          Restarts a process without Xdebug
rc  php-ds                               1.3.0-8+ubuntu20.04.1+deb.sury.org+3                                amd64        PHP extension providing efficient data structures for PHP 7
rc  php-igbinary                         3.2.6+2.0.8-2+ubuntu20.04.1+deb.sury.org+3                          amd64        igbinary PHP serializer
ii  php-json-schema                      5.2.9-1                                                             all          implementation of JSON schema
rc  php-memcache                         8.0+4.0.5.2+3.0.9~20170802.e702b5f9+-3+ubuntu20.04.1+deb.sury.org+3 amd64        memcache extension module for PHP
rc  php-memcached                        3.1.5+2.2.0-10+ubuntu20.04.1+deb.sury.org+3                         amd64        memcached extension module for PHP, uses libmemcached
rc  php-msgpack                          2.2.0~rc1+2.1.2+0.5.7-2+ubuntu20.04.1+deb.sury.org+3                amd64        PHP extension for interfacing with MessagePack
ii  php-psr-container                    1.0.0-2                                                             all          Common Container Interface (PHP FIG PSR-11)
ii  php-psr-log                          1.1.2-1                                                             all          common interface for logging libraries
rc  php-rrd                              2.0.3+1.1.3-2+ubuntu20.04.1+deb.sury.org+3                          amd64        PHP bindings to rrd tool system
ii  php-symfony-console                  4.3.8+dfsg-1ubuntu1                                                 all          run tasks from the command line
ii  php-symfony-filesystem               4.3.8+dfsg-1ubuntu1                                                 all          basic filesystem utilities
ii  php-symfony-finder                   4.3.8+dfsg-1ubuntu1                                                 all          find files and directories
ii  php-symfony-process                  4.3.8+dfsg-1ubuntu1                                                 all          execute commands in sub-processes
ii  php-symfony-service-contracts        1.1.8-1                                                             all          Generic abstractions related to writing services
rc  php-yaml                             2.2.2+2.1.0+2.0.4+1.3.2-1+ubuntu20.04.1+deb.sury.org+3              amd64        YAML-1.1 parser and emitter for PHP
ii  php8.0                               8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.0-bcmath                        8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        Bcmath module for PHP
ii  php8.0-cgi                           8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        server-side, HTML-embedded scripting language (CGI binary)
ii  php8.0-cli                           8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        command-line interpreter for the PHP scripting language
ii  php8.0-common                        8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        documentation, examples and common module for PHP
ii  php8.0-curl                          8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        CURL module for PHP
ii  php8.0-ds                            1.3.0-8+ubuntu20.04.1+deb.sury.org+3                                amd64        PHP extension providing efficient data structures for PHP 7
ii  php8.0-gd                            8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        GD module for PHP
ii  php8.0-igbinary                      3.2.6+2.0.8-2+ubuntu20.04.1+deb.sury.org+3                          amd64        igbinary PHP serializer
ii  php8.0-intl                          8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        Internationalisation module for PHP
ii  php8.0-mbstring                      8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        MBSTRING module for PHP
ii  php8.0-memcache                      8.0+4.0.5.2+3.0.9~20170802.e702b5f9+-3+ubuntu20.04.1+deb.sury.org+3 amd64        memcache extension module for PHP
ii  php8.0-memcached                     3.1.5+2.2.0-10+ubuntu20.04.1+deb.sury.org+3                         amd64        memcached extension module for PHP, uses libmemcached
ii  php8.0-msgpack                       2.2.0~rc1+2.1.2+0.5.7-2+ubuntu20.04.1+deb.sury.org+3                amd64        PHP extension for interfacing with MessagePack
ii  php8.0-mysql                         8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        MySQL module for PHP
ii  php8.0-opcache                       8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        Zend OpCache module for PHP
ii  php8.0-readline                      8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        readline module for PHP
ii  php8.0-rrd                           2.0.3+1.1.3-2+ubuntu20.04.1+deb.sury.org+3                          amd64        PHP bindings to rrd tool system
ii  php8.0-snmp                          8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        SNMP module for PHP
ii  php8.0-xml                           8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.0-yaml                          2.2.2+2.1.0+2.0.4+1.3.2-1+ubuntu20.04.1+deb.sury.org+3              amd64        YAML-1.1 parser and emitter for PHP
ii  php8.0-zip                           8.0.14-1+ubuntu20.04.1+deb.sury.org+1                               amd64        Zip module for PHP
CONFIGURATION
APP_DEBUG=false
APP_URL="https://atl.communityix.org"
APP_TIMEZONE="UTC"
APP_LOG="single"
APP_LOG_LEVEL=debug
IXP_RESELLER_ENABLED=false
IXP_AS112_UI_ACTIVE=true
IXP_FE_FRONTEND_DISABLED_LOGO=false
GRAPHER_BACKENDS="mrtg|sflow"
GRAPHER_CACHE_ENABLED=true
GRAPHER_BACKEND_MRTG_DBTYPE="rrd"
GRAPHER_BACKEND_MRTG_WORKDIR="/srv/mrtg"
GRAPHER_BACKEND_MRTG_LOGDIR="/srv/mrtg"
GRAPHER_BACKEND_SFLOW_ENABLED=true
GRAPHER_BACKEND_SFLOW_ROOT="http://REDACTED/grapher-sflow"
IXP_API_JSONEXPORTSCHEMA_PUBLIC=true
VIEW_SKIN="cix-atl"
CACHE_DRIVER=memcached
DOCTRINE_PROXY_AUTOGENERATE=false
DOCTRINE_CACHE=memcached
DOCTRINE_CACHE_NAMESPACE=IXPMANAGERNAMESPACE
IXP_IRRDB_BGPQ3_PATH=/usr/bin/bgpq3
IXP_RPKI_RTR1_HOST=REDACTED
IXP_RPKI_RTR1_PORT=3323
IXP_RPKI_RTR2_HOST=REDACTED
IXP_RPKI_RTR2_PORT=3323
IXP_FE_FRONTEND_DISABLED_PEERING_MANAGER=true
IXP_FE_FRONTEND_DISABLED_PEERING_MATRIX=true
IXP_FE_FRONTEND_DISABLED_LOOKING_GLASS=false
IXP_FE_FRONTEND_DISABLED_FILTERED_PREFIXES=false
SUMMARY

I recently upgraded from v5.7.0 all the way through all intermediate versions to v6.2.0. Along the way I noticed that Discovered Addresses under MAC Addresses lists the interface multiples times. The number of repeats varies peer Customer but seems to be grouped by switch (e.g. customers on switch A repeat 74 times, switch B 103 times, etc). The number of repeats does not seem to correlate to number of interfaces per switch nor interface types. And the first time the interface appears is truncated. For example

edge01.atl002::Ethe
edge01.atl002::Ethernet1
edge01.atl002::Ethernet1
edge01.atl002::Ethernet1
edge01.atl002::Ethernet1
edge01.atl002::Ethernet1
edge01.atl002::Ethernet1
edge01.atl002::Ethernet1
edge01.atl002::Ethernet1
<snip>

Additionally, the IPv6 addresses are incorrect and identical for every Customer: 2001:504:40:12::1:100,2001:504:40:12::1:101,...,2001:504:40:12::1:141,2001:504:40:12::1:142,2001:504:40:12: The "..." is for brevity: the addresses monotonically increase from 2001:504:40:12::1:100 to 2001:504:40:12::1:143, which is truncated.

While I did not explicitly check the Discovered Addresses prior to the upgrade, I have another IXP Manager v5.7.0 that displays Discovered Addresses as expected, so I assume it was working. I also do no know if the problem first appeared with the upgrade to v5.8.0 or v6.0.0, but according to my maintenance notes, it was definitely in this unexpected state while running v6.0.0.

IMPORTANCE

This appears to be cosmetic as the database looks ok, and sflow, which relies on the addresses, also seems to be working ok. So this issue is not urgent.

nickhilliard commented 2 years ago

just to rule stuff out, can you confirm that there is no skin code for this in the resources/skins/cix-atl/mac-address/ and resources/skins/cix-atl/layer2-address/ directories?

0xmc commented 2 years ago

Hi Nick,

No skin code for macs:

/srv/ixpmanager/resources/skins/cix-atl$ grep -r -i address *
/srv/ixpmanager/resources/skins/cix-atl$ ls -R
.:
content  layouts  services

./content:
0

./content/0:
support.foil.php

./layouts:
footer-content.foil.php  header-documentation.foil.php

./services:
grapher

./services/grapher:
mrtg

./services/grapher/mrtg:
trunks.foil.php
nickhilliard commented 2 years ago

ok there seems to be a repeatable issue here. We'll take a look.

nickhilliard commented 2 years ago

Meant to follow up on this. This problem should be fixed in commit daee524ee38bdb3c250a2ac827dd8322bc417c91. As a separate but related issue, you should run ./artisan utils:expunge-logs after upgrading to this version.

0xmc commented 2 years ago

Thanks!

On Mon, Feb 14, 2022 at 5:44 PM Nick Hilliard @.***> wrote:

Meant to follow up on this. This problem should be fixed in commit daee524 https://github.com/inex/IXP-Manager/commit/daee524ee38bdb3c250a2ac827dd8322bc417c91. As a separate but related issue, you should run ./artisan utils:expunge-logs after upgrading to this version.

— Reply to this email directly, view it on GitHub https://github.com/inex/IXP-Manager/issues/765#issuecomment-1039689942, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHX32QTYBJ4RLLGDVC2Z4LU3GHT3ANCNFSM5LAK7PRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>