-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build]: Include SONiC version into installer. #472
Conversation
Makefile
Outdated
@@ -36,8 +37,7 @@ DOCKER_BUILD = docker build --no-cache \ | |||
-C sonic \ | |||
-f slave.mk \ | |||
PLATFORM=$(PLATFORM) \ | |||
DEBUG_BUILD=$(DEBUG_BUILD) \ | |||
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to keep ENABLE_DHCP_GRAPH_SERVICE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -36,8 +37,7 @@ DOCKER_BUILD = docker build --no-cache \ | |||
-C sonic \ | |||
-f slave.mk \ | |||
PLATFORM=$(PLATFORM) \ | |||
DEBUG_BUILD=$(DEBUG_BUILD) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why DEBUG_BUILD option is removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is redundant. In case build contains local changes, "dirty" will be appended to version or used instead of git revision.
functions.sh
Outdated
if [ "$describe" == "$latest_tag" ]; then | ||
echo "$latest_tag" | ||
else | ||
echo "${latest_tag}.${BUILD_NUMBER}-$(git rev-parse --short HEAD)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case we are not on tagged commit, I am not sure how useful the latest_tag is useful here, maybe it is better to use the branch name?
git rev-parse --abbrev-ref HEAD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can keep the DEBUG_BUILD option here, in case there are uncommitted local changes, we can add append dirty to the version. we can just move the logic into sonic_get_version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case there are some uncommitted local changes, we can always add "dirty" to version without DEBUG_BUILD option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest tag is included into image to have as much info as possible.
Usually if, for instance, feature is supported since SONiC-17.04, then it is true for 17.04.123 (some daily build). That will allow user to know what is available for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added "dirty"
functions.sh
Outdated
local describe=$(git describe --tags) | ||
local latest_tag=$(git describe --tags --abbrev=0) | ||
BUILD_NUMBER=${BUILD_NUMBER:-dev} | ||
## Cehck if we are on tagged commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: Check if we are on a tagged commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: marian-pritsak <marianp@mellanox.com>
Signed-off-by: marian-pritsak <marianp@mellanox.com>
Retest this please |
1 similar comment
Retest this please |
build_debian.sh
Outdated
sudo tee $FILESYSTEM_ROOT/etc/sonic/sonic_version.yml > /dev/null <<EOF | ||
build_version: $(sonic_get_version) | ||
debian_version: $(cat $FILESYSTEM_ROOT/etc/debian_version) | ||
kversion: $kversion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the variable name?
If we do have a concrete reason to change the name, please update sysDescription.j2 in snmp docker as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree that it is probably better to keep prev name, kernel_version: $kversion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In sysDescription.j2, do we want to remove SONiC.v2
from {{ build_version }}.SONiC.v2
? Or, maybe change to SONiC.{{build_version}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kversion was a typo. Thanks for comment.
Retest this please |
retest this please |
@taoyl-ms, can you check this again? |
* a1b6fa3 2018-04-16 | [vlanmgr]: Fix the incorrect ip link del command for vlan remove (#474) (HEAD, origin/201803) [Jipan Yang] * 66287cf 2018-05-18 | fix SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH value type mismatch bug (#502) [yangbashuang] * 43365f3 2018-05-14 | [crmorch]: neighbor used counter increased twice (#472) (#501) [MaxPolovyi] Signed-off-by: Guohan Lu <gulv@microsoft.com>
swss: [vxlanorch]: Allow ipv6 src ip for Vxlan tunnel creation (sonic-net#896) [aclorch]: Allow DTEL drop actions in DTEL flow watchlist (sonic-net#915) Fix typo in orchagent_restart_check from fasle to false. (sonic-net#923) [sonic-swss]: Fix for FPM accept call failure in ARM arch (sonic-net#925) Add retryCount option for orchagent_restart_check program. (sonic-net#833) [vlan] Add pytest cases to validate nonexistent vlan behavior. (sonic-net#874) [intfsorch] Wait for interface prior to prefix (sonic-net#796) Set timer only when interval changes. Not in each firing of the timer. (sonic-net#945) [test]: Fix set interface in configuration database (sonic-net#956) [copporch]: Fix polymorphic type error (sonic-net#946) [AclOrch]: Fix the acl mirror counter doubled by inactive mirror and active again (sonic-net#952) [MirrorOrch]: Init the next hop ip with 0 instead of default constructor (sonic-net#953) [portsorch]: Add reference count of port (sonic-net#962) [mock_test]: Move mock tests into a separate folder to separate them from vs tests (sonic-net#950) remove crm acl_counters when acl_table removed (sonic-net#918) [aclorch]: Fix matching MIRROR_DSCP throws unnecessary errors (sonic-net#966) [policerorch]: Fix return code comparison error (sonic-net#968) [gitignore]: Add swss-dbg related files (sonic-net#967) [vxlanmgrd]: Fix for vxlanmgrd cannot correctly work after config reload (sonic-net#934) [vxlanorch]: Add extra info into NOTICE logs (sonic-net#891) [test]: Add a neighbor entry with BCAST MAC and verify its ignored (sonic-net#955) [copporch]: Fix copporch in DEL command (sonic-net#972) [orchagent]: Fix crash during orchagent process exit (sonic-net#974) [vnetorch]: Fix VNET orchagents order for warm-reboot flow (sonic-net#958) [test]: Skip unstable test test_vnet_orch_1 (sonic-net#976) [intfsorch]: Fix rif flex counter removal error (sonic-net#975) Update tests README.md file [aclorch]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (sonic-net#978) [test]: Skip test_watermark.py::TestWatermark::test_lua_plugins (sonic-net#981) [teamsyncd]: Add information for LAG membership changes (sonic-net#982) common: Add an assert to logger, which will log a message and abort. (sonic-net#286) [test]: Add IpAddress::isZero() unit test (sonic-net#289) do not abort when read timerfd return 0 and errno = 0 (sonic-net#291) Add BGP_STATE_TABLE in stateDB (sonic-net#273) [IpAddress]: add mcast scope on address and isFullMask method on prefix (sonic-net#285) Add ignore Wshadow pragma to json.hpp (sonic-net#292) [executor]: Fix Executor does not get correct priority saved in m_selectable (sonic-net#290) [schema]: Remove duplicate STATE_MIRROR_SESSION_TABLE_NAME (sonic-net#294) timerfd:read failure - Record in logs as error. (sonic-net#295) [schema]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (sonic-net#296) [schema]: Add PASS_THROUGH_ROUTE_TABLE to config and application db (sonic-net#297) sairedis: ARM32 bit fixes, for 64bit printf format specifier (sonic-net#468) Reduce the timeout (GET_RESPONSE_TIMEOUT) from 6 minutes to 1 minute. (sonic-net#472) Fixed config_syncd_barefoot function (sonic-net#474) [syncd_init_common.sh] fix fast reboot backwards compatibility (sonic-net#480) Add default bridge id for bridge port id of type PORT in virtual switch (sonic-net#473) Fix a bug in parsing kernel argument of fast-reboot (sonic-net#482) Add TimerWatchdog for monitoring long execution apis (sonic-net#469) Add specific comparison logic for tunnel map (sonic-net#475) [vslib] add ACL action capabilities support (sonic-net#481) Per buffer pool watermark polling mode (sonic-net#485) Add specific comparison logic for ACL counter (sonic-net#484) Process flex counters requests in separate thread (sonic-net#483) Make sairedis/syncd synchronous (sonic-net#476) Fixed conditional operator. (sonic-net#487) Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
swss: [vxlanorch]: Allow ipv6 src ip for Vxlan tunnel creation (#896) [aclorch]: Allow DTEL drop actions in DTEL flow watchlist (#915) Fix typo in orchagent_restart_check from fasle to false. (#923) [sonic-swss]: Fix for FPM accept call failure in ARM arch (#925) Add retryCount option for orchagent_restart_check program. (#833) [vlan] Add pytest cases to validate nonexistent vlan behavior. (#874) [intfsorch] Wait for interface prior to prefix (#796) Set timer only when interval changes. Not in each firing of the timer. (#945) [test]: Fix set interface in configuration database (#956) [copporch]: Fix polymorphic type error (#946) [AclOrch]: Fix the acl mirror counter doubled by inactive mirror and active again (#952) [MirrorOrch]: Init the next hop ip with 0 instead of default constructor (#953) [portsorch]: Add reference count of port (#962) [mock_test]: Move mock tests into a separate folder to separate them from vs tests (#950) remove crm acl_counters when acl_table removed (#918) [aclorch]: Fix matching MIRROR_DSCP throws unnecessary errors (#966) [policerorch]: Fix return code comparison error (#968) [gitignore]: Add swss-dbg related files (#967) [vxlanmgrd]: Fix for vxlanmgrd cannot correctly work after config reload (#934) [vxlanorch]: Add extra info into NOTICE logs (#891) [test]: Add a neighbor entry with BCAST MAC and verify its ignored (#955) [copporch]: Fix copporch in DEL command (#972) [orchagent]: Fix crash during orchagent process exit (#974) [vnetorch]: Fix VNET orchagents order for warm-reboot flow (#958) [test]: Skip unstable test test_vnet_orch_1 (#976) [intfsorch]: Fix rif flex counter removal error (#975) Update tests README.md file [aclorch]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (#978) [test]: Skip test_watermark.py::TestWatermark::test_lua_plugins (#981) [teamsyncd]: Add information for LAG membership changes (#982) common: Add an assert to logger, which will log a message and abort. (#286) [test]: Add IpAddress::isZero() unit test (#289) do not abort when read timerfd return 0 and errno = 0 (#291) Add BGP_STATE_TABLE in stateDB (#273) [IpAddress]: add mcast scope on address and isFullMask method on prefix (#285) Add ignore Wshadow pragma to json.hpp (#292) [executor]: Fix Executor does not get correct priority saved in m_selectable (#290) [schema]: Remove duplicate STATE_MIRROR_SESSION_TABLE_NAME (#294) timerfd:read failure - Record in logs as error. (#295) [schema]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (#296) [schema]: Add PASS_THROUGH_ROUTE_TABLE to config and application db (#297) sairedis: ARM32 bit fixes, for 64bit printf format specifier (#468) Reduce the timeout (GET_RESPONSE_TIMEOUT) from 6 minutes to 1 minute. (#472) Fixed config_syncd_barefoot function (#474) [syncd_init_common.sh] fix fast reboot backwards compatibility (#480) Add default bridge id for bridge port id of type PORT in virtual switch (#473) Fix a bug in parsing kernel argument of fast-reboot (#482) Add TimerWatchdog for monitoring long execution apis (#469) Add specific comparison logic for tunnel map (#475) [vslib] add ACL action capabilities support (#481) Per buffer pool watermark polling mode (#485) Add specific comparison logic for ACL counter (#484) Process flex counters requests in separate thread (#483) Make sairedis/syncd synchronous (#476) Fixed conditional operator. (#487) Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
[warm/fast reboot] continue executing when killing docker failed (sonic-net#713) [Ying Xie] [neighbor_advertiser]: Add sleep in setting mirror session and ACL rules(sonic-net#714)[Shuotian Cheng] [config]: Flush the neighbor table when removing the router interface(sonic-net#606) [Shuotian Cheng] Add a generic configlet application script (sonic-net#716) [Renuka Manavalan] Management vrf snmp cli support (sonic-net#472) [Harish Venkatraman] show subinterfaces status (sonic-net#642) [Wenda Ni] sonic-utilities: Add support for sFlow (sonic-net#592) [Garrick He]
- [warm/fast reboot] continue executing when killing docker failed (#713) [Ying Xie] - [neighbor_advertiser]: Add sleep in setting mirror session and ACL rules(#714)[Shuotian Cheng] - [config]: Flush the neighbor table when removing the router interface(#606) [Shuotian Cheng] - Add a generic configlet application script (#716) [Renuka Manavalan] - Management vrf snmp cli support (#472) [Harish Venkatraman] - show subinterfaces status (#642) [Wenda Ni] - sonic-utilities: Add support for sFlow (#592) [Garrick He]
- [warm/fast reboot] continue executing when killing docker failed (sonic-net#713) [Ying Xie] - [neighbor_advertiser]: Add sleep in setting mirror session and ACL rules(sonic-net#714)[Shuotian Cheng] - [config]: Flush the neighbor table when removing the router interface(sonic-net#606) [Shuotian Cheng] - Add a generic configlet application script (sonic-net#716) [Renuka Manavalan] - Management vrf snmp cli support (sonic-net#472) [Harish Venkatraman] - show subinterfaces status (sonic-net#642) [Wenda Ni] - sonic-utilities: Add support for sFlow (sonic-net#592) [Garrick He]
* [crmorch]: neighbor used counter increased twice
…ic-net#501) * [crmorch]: neighbor used counter increased twice
804c9f9 [sonic-swss-common] Add a string utilities function to join items in a container (#463) 1e924ac Fix: ConfigDBConnector call super init with proper parameter name (#470) 70e02c8 [azp] Purge swss before installing the newly built deb package (#472) 15c0f72 [swig] translate SonicV2Connector::keys return type from C++ vector to Python list (#468)
*804c9f9 [sonic-swss-common] Add a string utilities function to join items in a container (#463) *1e924ac Fix: ConfigDBConnector call super init with proper parameter name (#470) *70e02c8 [azp] Purge swss before installing the newly built deb package (#472) *15c0f72 [swig] translate SonicV2Connector::keys return type from C++ vector to Python list (#468)
sonic-swss: - [Monitor Vlan] Fix a typo in hostif (sonic-net#1722) - Update pool sizes during initialization from timer only (sonic-net#1708) - [SflowMgr] SamplingRate Update by Speed Change Added (sonic-net#1721) sonic-swss-common: - [swss-common] Add MUX Metrics Table (sonic-net#482) - [azp] Purge swss before installing the newly built deb package (sonic-net#472) sonic-utilities: - disk_check: Check & mount RO as RW using tmpfs (sonic-net#1569) - No more IP validation as it is more likely a URL (sonic-net#1555) - Stop PMON docker before cold and soft reboots (sonic-net#1514) - Add soft-reboot reboot type (sonic-net#1453) - [acl] Use a list instead of a comma-separated string for ACL port list (sonic-net#1519) - sonic-installer: fix py3 issues in bootloader.aboot (sonic-net#1553) - Fix unsupported fs.squashfs extraction in sonic-installer (sonic-net#1366) - [show][config] cli support for firmware upgrade on Y-Cable (sonic-net#1528) (sonic-net#1558) sonic-linux-kernel: - [Mellanox] backport kernel patches for hw-management 7.0100.2303 (sonic-net#211) Signed-off-by: Danny Allen <daall@microsoft.com>
* [202012][swss/swss-common/utilities/kernel] Update submodule sonic-swss: - [Monitor Vlan] Fix a typo in hostif (#1722) - Update pool sizes during initialization from timer only (#1708) - [SflowMgr] SamplingRate Update by Speed Change Added (#1721) sonic-swss-common: - [swss-common] Add MUX Metrics Table (#482) - [azp] Purge swss before installing the newly built deb package (#472) sonic-utilities: - disk_check: Check & mount RO as RW using tmpfs (#1569) - No more IP validation as it is more likely a URL (#1555) - Stop PMON docker before cold and soft reboots (#1514) - Add soft-reboot reboot type (#1453) - [acl] Use a list instead of a comma-separated string for ACL port list (#1519) - sonic-installer: fix py3 issues in bootloader.aboot (#1553) - Fix unsupported fs.squashfs extraction in sonic-installer (#1366) - [show][config] cli support for firmware upgrade on Y-Cable (#1528) (#1558) sonic-linux-kernel: - [Mellanox] backport kernel patches for hw-management 7.0100.2303 (#211) Signed-off-by: Danny Allen <daall@microsoft.com> * Update utilities w/ build fix
* [sonic-utilities] managementVRF cli support(l3mdev) This commit adds CLI support for management VRF using l3dev. mVRF can be enabled using config vrf add mgmt and deleted using config vrf del mgmt. Show commands for management VRF are added which displays the linux command output, will update show command display after concluding what would be the output for the show commands. Added cli to configure management interface(eth0), config interface ip eth0 add can be used to configure eth0 ip and config ip eth0 remove is used to remove eth0 ip. New cli config/show commands: config vrf add mgmt config vrf del mgmt config interface eth0 ip add ip/mask gatewayIP config interface eth0 ip remove ip/mask show mgmt-vrf show mgmt-vrf route show mgmt-vrf addresses show mgmt-vrf interfaces Signed-off-by: Harish Venkatraman <harish_venkatraman@dell.com>
804c9f9 [sonic-swss-common] Add a string utilities function to join items in a container (sonic-net#463) 1e924ac Fix: ConfigDBConnector call super init with proper parameter name (sonic-net#470) 70e02c8 [azp] Purge swss before installing the newly built deb package (sonic-net#472) 15c0f72 [swig] translate SonicV2Connector::keys return type from C++ vector to Python list (sonic-net#468)
804c9f9 [sonic-swss-common] Add a string utilities function to join items in a container (sonic-net#463) 1e924ac Fix: ConfigDBConnector call super init with proper parameter name (sonic-net#470) 70e02c8 [azp] Purge swss before installing the newly built deb package (sonic-net#472) 15c0f72 [swig] translate SonicV2Connector::keys return type from C++ vector to Python list (sonic-net#468)
Signed-off-by: marian-pritsak marianp@mellanox.com