Bandwidth monitoring interface for default storage node is incorrectly set by installer.
-
svn 4405 cloud 5469 Fedora 23 Server minimal
The installer correctly identified my external interface name in Fedora 23 server, when it asks for confirmation on the interface name. It’s
ens3
in this case. But, the default storage node created with a fresh installation sets the interface for this node aseth0
, which obviously breaks the bandwidth monitor.I’ve done a little digging, trying to figure out where the initial configuration is happening, and I’ve found two files (in the installation files) that have different settings set in them.
inside of
/svn/trunk/packages/web/lib/fog/Config.class.php
Line 48:
define( "MULTICASTINTERFACE", "eth0" );
lines 100 and 101:
define('NFS_ETH_MONITOR', 'eth0'); define('UDPCAST_INTERFACE', 'eth0');
However, inside of
svn/trunk/lib/common/functions.sh
, it looks like the interface is being set, but it’s not working?Line 1122:
private static function init_setting() { define('TFTP_HOST', \"${ipaddress}\"); define('TFTP_FTP_USERNAME', \"${username}\"); define('TFTP_FTP_PASSWORD', \"${password}\"); define('TFTP_PXE_KERNEL_DIR', \"${webdirdest}/service/ipxe/\"); define('PXE_KERNEL', 'bzImage'); define('PXE_KERNEL_RAMDISK',127000); define('USE_SLOPPY_NAME_LOOKUPS',true); define('MEMTEST_KERNEL', 'memtest.bin'); define('PXE_IMAGE', 'init.xz'); define('PXE_IMAGE_DNSADDRESS', \"${dnsbootimage}\"); define('STORAGE_HOST', \"${ipaddress}\"); define('STORAGE_FTP_USERNAME', \"${username}\"); define('STORAGE_FTP_PASSWORD', \"${password}\"); define('STORAGE_DATADIR', '${storageLocation}/'); define('STORAGE_DATADIR_UPLOAD', '${storageLocation}/dev/'); define('STORAGE_BANDWIDTHPATH', '/${webroot}status/bandwidth.php'); define('UPLOADRESIZEPCT',5); define('WEB_HOST', \"${ipaddress}\"); define('WOL_HOST', \"${ipaddress}\"); define('WOL_PATH', '/${webroot}wol/wol.php'); define('WOL_INTERFACE', \"${interface}\"); define('SNAPINDIR', \"${snapindir}/\"); define('QUEUESIZE', '10'); define('CHECKIN_TIMEOUT',600); define('USER_MINPASSLENGTH',4); define('USER_VALIDPASSCHARS','1234567890ABCDEFGHIJKLMNOPQRSTUVWZXYabcdefghijklmnopqrstuvwxyz_()^!#-'); define('NFS_ETH_MONITOR', \"${interface}\"); define('UDPCAST_INTERFACE', \"${interface}\"); define('UDPCAST_STARTINGPORT', 63100 ); // Must be an even number! recommended between 49152 to 65535 define('FOG_MULTICAST_MAX_SESSIONS',64); define('FOG_JPGRAPH_VERSION', '2.3'); define('FOG_REPORT_DIR', './reports/'); define('FOG_UPLOADIGNOREPAGEHIBER',true); define('FOG_DONATE_MINING', \"${donate}\"); }
-
I don’t think it was incorrectly set by installer, but rather, it was incorrect (defaulting to eth0) from a long time ago. Probably before I started reading the name of the interface.