Skip to content
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

Fix pyyang issue 202012 #15902

Closed
wants to merge 1,674 commits into from
Closed

Conversation

xumia
Copy link
Collaborator

@xumia xumia commented Jul 19, 2023

Why I did it

Cherry pick from PR: #15890
Fix the armhf build failure.
How to reproduce the issue:

docker run -it debain:bullseye bash
apt-get update && apt-get install -y python3-pip
pip3 install PyYAML==5.4.1

Error message:

Collecting PyYAML==5.4.1
  Downloading PyYAML-5.4.1.tar.gz (175 kB)
     |████████████████████████████████| 175 kB 12.3 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmp6xabslgb_in_process.py get_requires_for_build_wheel /tmp/tmp_er01ztl
....
      raise AttributeError(attr)
  AttributeError: cython_sources
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz#sha256=607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e (from https://pypi.org/simple/pyyaml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp6xabslgb_in_process.py get_requires_for_build_wheel /tmp/tmp_er01ztl Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement PyYAML==5.4.1
ERROR: No matching distribution found for PyYAML==5.4.1
root@fa2fa92edcfd:/# 

But if adding the option --no-build-isolation, then it is good, see fix.

install "PyYAML==5.4.1" --no-build-isolation

The same error can be found in the multiple builds.

Work item tracking
  • Microsoft ADO (number only): 24567457

How I did it

Add a build option --no-build-isolation.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

kellyyeh and others added 30 commits October 19, 2022 10:04
…net#12436)

co-authorized by: [email protected]

Why I did it
Now, checkout code step and KVM test job can't be cancelled even though the whole build is cancelled.
That's because by using Azure Pipeline Conditions, we customized the running condition, and we need to react to the Cancel action explicitly by asserting 'succeeded'
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#succeeded
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml#ive-got-a-conditional-step-that-runs-even-when-a-job-is-canceled-how-do-i-manage-to-cancel-all-jobs-at-once

How I did it
Assert 'succeeded' condition explicitly.

How to verify it
Verified by cancelling and rerunning the azure pipeline.
commit aa8fe6deff466909909430f00598d2dba9490904 (HEAD -> 202012, origin/202012)
Author: Jing Zhang [email protected]
Date: Tue Oct 11 10:22:02 2022 -0700

[Active-Standby] avoid posting mux metrics event when receiving unsolicited mux state notification  (sonic-net#142)

Description of PR
Summary:
Fixes # (issue)

This PR is to fix incorrect mux metrics timestamps caused by unsolicited mux state notification.

Sign-off: Jing Zhang [email protected]
sign-off: Jing Zhang [email protected]
…sonic-net#12461)

Why I did it
Cherry-pick from sonic-net#8950

Sonic-swss-common requires gmock for staged unit tests

How I did it
Installed dependency in sonic-buster-build docker file

How to verify it
rebuild the build container
…nic-net#12467)

Why I did it
Cherry pick sonic-net#9519.

when we remove a port and add it back immediately - lldp is keep failing
warning message keeps appearing:
[WARN/lldp] unable to send packet on real device for Ethernet4: No such device or address

How I did it
on delete link events it will immediately execute delete without using aggregate events mechanism.

How to verify it
Run autorestart/test_container_autorestart.py in sonic-mgmt repo
Or manual test steps:
sudo config feature autorestart swss disabled
docker exec swss supervisorctl status
docker exec swss kill -SIGKILL 111(orchagent)
docker inspect -f {{.State.Running}} swss => make sure swss is running
docker exec swss supervisorctl start orchagent

Signed-off-by: Zhaohui Sun <[email protected]>
- Skip the interface status check if the interface does not exist. In the future, when the interface is created/comes up this check will be triggered again.

Signed-off-by: Lawrence Lee <[email protected]>
* Fix to improve hostname handling
If config_db.json is missing hostname entry, hostname-config.sh ends
up deleting existing entry too and hostname changes to default 'localhost'

* default hostname to 'sonic` if missing in config file
Update sonic-swss submodule pointer to include the following:
* 08711a8 [orchdaemon]: Fixed sairedis record file rotation ([sonic-net#2481](sonic-net/sonic-swss#2481))

Signed-off-by: dprital <[email protected]>
… (sonic-net#12454)

* [TestbedV2]Migrate t0 and t1-lag to TestbedV2 (sonic-net#12383)

signed-off-by: [email protected]

Migrate the t0 and t1-lag test jobs in buildimage repo to TestbedV2.

Why I did it
Migrate the t0 and t1-lag test jobs in buildimage repo to TestbedV2.

How I did it
Migrate the t0 and t1-lag test jobs in buildimage repo to TestbedV2.

Remove ceos type setting

Use 202012 branch as sonic-mgmt branch

* Modify template to use 202012 branch
7272bf37 Revert "Revert "[DHCPv6] [202012] Update the dhcpv6_relay config/show cli (sonic-net#2271)" (sonic-net#2336)" (sonic-net#2459)
Signed-off-by: Vivek Reddy <[email protected]>
- Why I did it
Update SDK/FW version - 4.5.3186/2010_3186 in order to have the following changes:

New functionality:
1. Added support for 6.5W (Class 8) in ports 49-50, 53-54, 57-58, and 61-62 on SN4600 system

Fix the following issues:
1. On very rare occasion (~1/100K), during I2C transaction with MMS1V50-WM and MMS1V90-WR modules on SN4700 system, the module may send unexpected stop which violate the I2C specification, possibly affecting the link up flow
2. When running 1GbE speeds on SN4600 system, the port remained active while peer side was closed
3. While toggling the cable with ‘sfputil lpmode on/off’, error msg like “ERR pmon#xcvrd: Receive PMPE error event on module 1: status {X} error type {y}” could be received
4. When toggling many ports of the Spectrum devices while raising 10GbE link up and link maintenance is enabled, the switch may get stuck and may need to be rebooted
5. When trying to reconfigure the Flex Parser header and Flex transition parameters after ISSU, the switch will returned an error even if the configuration was identical to that done before performing the ISSU
6. While moving from lossless to lossy mode while shared headroom was used, reduction of the shared headroom can only be done prior to pool type change and when shared headroom is not utilized
7. SLL configuration is missing in SDK dump
8. If TTL_CMD_COPY is used in Encap direction for a packet with no TTL, then the value passed in the ttl data structure will be used if non-zero (default 255 if zero)
9. PCI calibration changes from a static to a dynamic mechanism
10. Layer 4 port information is not initialized for BFD packet event. To address the issue, remote peer UDP port information was added in BFD packet event
11. SDK returned error when FEC mode is set on twisted pair, when FEC was set to None

- How I did it
Update pointer for the SDK/FW

- How to verify it
Run regression tests

Signed-off-by: dprital <[email protected]>
…12399)

- Why I did it
ethtool is not able to read certain pages(eg. page 11h) of CMIS cables.
SDK provides a set of sysfs to expose the transceiver EEPROM, now we migrate from using ethtool to read these sysfs for transceiver EEPROM reading.

- How I did it
replace ethtool with accessing the SDK sysfs for cable EEPROM reading.
Adjust the offset according to the SDK sysfs memory map.

- How to verify it
run sonic-mgmt sfp-related regression test case.

Signed-off-by: Kebo Liu <[email protected]>
…12551)

Update sonic-platform-common submodule pointer to include the following:
* a2164f6 [202012] Fix issue: sff8436 does not support decoding power class 5~7 ([sonic-net#317](sonic-net/sonic-platform-common#317))
* 6722b4e Update the return of update_firmware for the image not exist case ([sonic-net#306](sonic-net/sonic-platform-common#306))

Signed-off-by: dprital <[email protected]>
…t#12478)

* [202012][RDMA] create split profiles for Arista-7050CX3-32S

Manually cherry-picking sonic-net#12228.

Signed-off-by: Ying Xie <[email protected]>
…d in ACL rule than caclmgrd gets exception (sonic-net#12577)

Why I did it
Creating this PR to take changes from sonic-net/sonic-host-services#21
jhli-cisco and others added 26 commits June 2, 2023 08:23
Fix for SR 695336631. x86 FPGA FPD needs to be upgraded to ver 1.88
…ded (sonic-net#14933)

Why I did it
Fix the issue where db_migrator is called before DB is loaded w/ config. This leads to db_migrator:

Not finding anything, and resumes to incorrectly migrate every missing config
This is not expected. migration should happen after the old config is loaded and only new schema changes need migration.
Since DB does not have anything when migrator is called, db_migrator fails when some APIs return None.
The reason for incorrect call is that:

database service starts db_migrator as part of startup sequence.
config-setup service loads data from old-config/minigraph. However, since it has Requires=database.service.
Hence, config-setup starts only when database service is started. And database service is started when db_migrator is completed.
Fixed by:

Check if this is first time boot by checking pending_config_migration flag.
If pending_config_migration is enabled, then do not call db_migrator as part of database service startup.
Let database service start which triggers config-setup service to start.
Now call db_migrator after when config-setup service loads old-config/minigraph
Changes in MRVL_PRESTERA_DRIVER_1.1_1:

- Memory leak fixed by adding missing releasing pci device.

Change-Id: I15a20412eac066894d4ddbebd58e1f127a20d968

Signed-off-by: Pavan Naregundi <[email protected]>
Why I did it
Cherry-pick of sonic-net#11827

This is to fix issue: [201811->202012] During warm recovery, TOR did not announce Loopback, VLAN route after upgrade

Suspected cause: 202012 does not have system dependency for bgp service to start after interfaces-config.service.

This opens a window for race condition: bgp service completing before interfaces are initialized.
BGP will miss announcing some routes if the interfaces are not ready.
Cherrypick sonic-net#12381 into 202012

Reverts sonic-net#15312

Work item tracking
Microsoft ADO (number only): 24163872
…5309)

Why I did it
Set build options in pipeline UI.
Support setting reproducible build options to py2,py3 in release branch and none in master branch.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
How to verify it
…e cleaned up after swss restart. (sonic-net#15398)

* [cleanup] tables VNET_MONITOR, BFD_SESSION, ROUTE_TUNNEL
sonic-net#13812) (sonic-net#15459)

Why I did it
Fix all mirror is commented out in sources.list in slave image issue. It will have an issue when installing more packages in the slave container.

It will add additional space character after running add-apt-repository command.

For example:
The original config in /etc/apt/sources.list

#deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free
Run the following command:

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable"
Then the setting changed to: (added a new space character after #)

# deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free
How I did it
Fix the regex string to add the space pattern. After fixed, whether there is a space character or not, it will not be an issue.

How to verify it

Co-authored-by: xumia <[email protected]>
#### Why I did it
fix possible cpld race read issue between watchdog and reboot cause process

##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it
Use flock to limit parallel access to cpld sys file

#### How to verify it
It can be simulate and verified with following python script

```python3
import signal
import subprocess
import threading

exit_flag = False

def run_command(cmd):
    status = True
    result = ""
    try:
        p = subprocess.Popen(
            cmd, shell=True, universal_newlines=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        raw_data, err = p.communicate()
        if err == '':
            result = raw_data.strip()
    except:
        status = False
    return status, result

def get_cpld_reg_value(getreg_path, register):
    #cmd = "echo {1} > {0}; cat {0}".format(getreg_path, register)
    cmd = "flock {0} -c 'echo {1} > {0}; cat {0}'".format(getreg_path,
register)
    status, result = run_command(cmd)
    return result if status else None

def cpld_read(thread_num, cpld_reg):
    while not exit_flag:
        val
= get_cpld_reg_value("/sys/devices/platform/dx010_cpld/getreg",
cpld_reg)
        print(f"Thread {thread_num}: get cpld reg {cpld_reg}, value
{val}")

def signal_handler(sig, frame):
    global exit_flag
    print("Ctrl+C detected. Quitting...")
    exit_flag = True

if __name__ == '__main__':
    # Register the signal handler for Ctrl+C
    signal.signal(signal.SIGINT, signal_handler)

    t1 = threading.Thread(target=cpld_read, args=(1, '0x103',))
    t2 = threading.Thread(target=cpld_read, args=(2, '0x141',))
    t1.start()
    t2.start()
    t1.join()
    t2.join()
```
…onic-net#15582)

[Ci] Support to build sonic-swss-common for test

- Microsoft ADO **(number only)**: 24341479
…g is loaded (sonic-net#14933)" (sonic-net#15464)

This reverts commit 02b1783.

Reverts sonic-net#14933

The earlier commit caused a race condition that particularly broke cross branch warm upgrade.

Issue happens when db_migrator is still migrating the DB and finalizer is checking DB for list of components to reconcile.

If migration is not complete, finalizer get an empty list to wait for. Due to this, finalizer concludes warmboot (deletes system wide warmboot flag) and cause all the services to do cold restart.

ADO: 24274591
BACKPORT OF sonic-net#14925

#### Why I did it

ISSU version check fails due to inability to mount squashfs from 202211 on 201911

#### How I did it

Put ISSU version file under platform directory

#### How to verify it

202012 (with [202012][mlnx-ffb.sh] Update issu-version location  sonic-net#14927) to master
#### Why I did it
Aikido FPD update, power CPLD version display under fwutil CLI and fix for cpu lockup causing telemetry container crash or system reboot

##### Work item tracking
- Microsoft ADO **(number only)**: 24174212

#### How I did it
update cisco module to 202012.3.1.1
…ic-net#15630)

Cherry pick PR for sonic-net/sonic-host-services#62

#### Why I did it
Fix the issue sonic-net#10883.

##### Work item tracking
- Microsoft ADO **(17795594)**:

#### How I did it
For performance reason, libswsscommon is not thread safe by design.
caclmgrd share config DB connection cross thread, so change to use new db connector in child thread.

#### How to verify it
Load scale ipv4/ipv6 rules and verify if caclmgrd is crashed
…atically (sonic-net#15543)

#### Why I did it
src/sonic-telemetry
```
* 56aa539 - (HEAD -> 202012, origin/202012) Fix sonic-mgmt-common version in pipeline build (sonic-net#124) (2 weeks ago) [Sachin Holla]
* 4264949 - Change log level (sonic-net#118) (4 weeks ago) [Zain Budhwani]
```
…AD (sonic-net#15532)

#### Why I did it
Update submodule sonic-utilities to the latest HEAD
```
50296b90 - [202012][dhcp-relay] Fix dhcp6relay counter issue (sonic-net#2866) (sonic-net#2873) (Fri Jun 30 18:08:53 2023 +0800) <Yaqiang Zhu>
160030c4 - [202012][dhcp_relay] Add "Reconfigure", "Information-Request", "Malformed" counter options (sonic-net#2844) (Sun Jun 11 20:35:30 2023 -0700) <kellyyeh>
e6289ced - [vlan][dhcp_relay] Clear dhcpv6 relay counter while deleting vlan (sonic-net#2852) (Fri Jun 2 18:20:21 2023 +0000) <Yaqiang Zhu>
885082ec - correctly parsing complete ipv6 vnet info (sonic-net#2827) (Thu May 25 06:01:40 2023 +0000) <Keith Lu>
```

##### Work item tracking
- Microsoft ADO 22635770
Why I did it
Refine PR test template format.

How I did it
Refine PR test template format.

How to verify it
PR test executed normally.

Signed-off-by: Chun'ang Li <[email protected]>
…net#15719)

Backport sonic-net#15461

#### Why I did it
* To fix `hiredis` compilation

#### How I did it
* Changed package version: `0.14.0-3~bpo9+1` -> `0.14.1-1`

#### How to verify it
1. make configure PLATFORM=mellanox
2. make target/sonic-mellanox.bin

#### Tested branch (Please provide the tested image version)
- [X] 202012 <!-- image version 1 -->
…ry leak issue. (sonic-net#8659) (sonic-net#15703)

This pull request extract tacacs support functions into library to share TACACS config file parse code with other project. Also fix memory leak issue in parse config code.

#### Why I did it
To support TACACS per command authorization, we need reuse the TACACS config file parse code in bash plugin project.

##### Work item tracking
- Microsoft ADO **(number only)**: 24433713

#### How I did it
Add libtacsupport.pc.in to extract tacacs support functions into library.
Fix memory leak issue in TACACS config parse code by convert the dynamic memory allocation memory to static memory allocation.

#### How to verify it
Pass all current UT.
Check shared library generated manually.

#### Tested branch (Please provide the tested image version)
Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
Also fix memory leak issue in parse config code.

- [ ] SONiC.202012-15703.306864-1ef589c19

#### Description for the changelog
Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
Also fix memory leak issue in parse config code.
…o support TACACS+ per-command authorization&accounting.(sonic-net#9029) (sonic-net#15718)

This pull request add Config DB schema and HostCfg Enforcer plugin to support TACACS+ per-command authorization&accounting.

##### Work item tracking
- Microsoft ADO **(number only)**: 24433713

#### Why I did it
    Support TACACS per-command authorization&accounting.

#### How I did it
    Change ConfigDB schema and HostCfg enforcer.
    Add UT to cover changed code.

#### How to verify it
    Build following project and pass all UTs:
    make target/python-wheels/sonic_host_services-1.0-py3-none-any.whl

#### Which release branch to backport (provide reason below if selected)
    N/A

#### Tested branch (Please provide the tested image version)
Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
Also fix memory leak issue in parse config code.

- [ ]  SONiC.202012-15723.309781-38d8852cd

#### Description for the changelog
    Add Config DB schema and HostCfg Enforcer plugin to support TACACS+ per-command authorization&accounting.
sonic-utilities submodule update

#### Why I did it
sonic-utilities submodule update:
```
399b1e3 2023-07-06 [202012][Show][BGP] Show BGP Change for no neighbor scenario (sonic-net#2886)
7b47641 2023-07-10 [[202012] [TACACS+] Add config command for AAA authorization and accounting. (sonic-net#1889)
```
##### Work item tracking
- Microsoft ADO **(number only)**:24433713

#### How I did it
Update sonic-utilities submodule.

#### How to verify it
Pass all test case.

#### Tested branch (Please provide the tested image version)
- [ ] SONiC.202012-15703.306864-1ef589c19
…nic-net#8750) (sonic-net#15788)

This pull request integrate audisp-tacplus to SONiC for per-command accounting.

##### Work item tracking
- Microsoft ADO **(number only)**: 24433713

#### Why I did it
To support TACACS per-command accounting, we integrate audisp-tacplus project to sonic.

#### How I did it
1. Add auditd service to SONiC
2. Port and patch audisp-tacplus to SONiC

#### How to verify it
UT with CUnit to cover all new code in usersecret-filter.c
Also pass all current UT.

#### Tested branch (Please provide the tested image version)
Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
Also fix memory leak issue in parse config code.

- [ ]  SONiC.202012-15723.312602-e230e2d3e

#### Description for the changelog
Add audisp-tacplus for per-command accounting.
Fix libtacsupport.so  can't parse tacplus_nss.conf issue and not reset server list before parse config file issue.

##### Work item tracking
- Microsoft ADO **(number only)**: 24433713

#### Why I did it
1. Fix libtacsupport.so can't parse tacplus_nss.conf correctly issue:
            Support debug=on setting.
            Support put server address and secret in same row.
2. Fix the parse_config_file method not reset server list before parse config file issue.

#### How I did it
Fix libtacsupport.so  can't parse tacplus_nss.conf issue and not reset server list before parse config file issue.

#### How to verify it
UT with CUnit cover all code in this plugin.
Also pass all current UT.

#### Which release branch to backport (provide reason below if selected)
    N/A

#### Tested branch (Please provide the tested image version)
Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
Also fix memory leak issue in parse config code.

- [ ]  SONiC.202012-15723.312602-e230e2d3e

#### Description for the changelog
Fix libtacsupport.so  can't parse tacplus_nss.conf issue and not reset server list before parse config file issue.
)

#### Why I did it
cherry pick, sonic-net#15535

Graceful restart is a key event for bgpd, related log print is debug level. To change it to info level to get more visibilities when this kind of event is triggered.

##### Work item tracking
- Microsoft ADO **(13875291)**:

#### How I did it
To create patch file to change from debug level to info level. 

#### How to verify it
To run PR test and capture the print.
…5890)

Why I did it
Fix the armhf build failure.
How to reproduce the issue:

docker run -it debain:bullseye bash
apt-get update && apt-get install -y python3-pip
pip3 install PyYAML==5.4.1
Error message:

Collecting PyYAML==5.4.1
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmp6xabslgb_in_process.py get_requires_for_build_wheel /tmp/tmp_er01ztl
....
      raise AttributeError(attr)
  AttributeError: cython_sources
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz#sha256=607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e (from https://pypi.org/simple/pyyaml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp6xabslgb_in_process.py get_requires_for_build_wheel /tmp/tmp_er01ztl Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement PyYAML==5.4.1
ERROR: No matching distribution found for PyYAML==5.4.1
root@fa2fa92edcfd:/#
But if adding the option --no-build-isolation, then it is good, see fix.

install "PyYAML==5.4.1" --no-build-isolation
The same error can be found in the multiple builds.

Work item tracking
Microsoft ADO (number only): 24567457

How I did it
Add a build option --no-build-isolation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.