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

[Celestica] Grant permission to udevrule scripts for udevprefix.rule generation #6032

Closed
wants to merge 579 commits into from

Conversation

sandycelestica
Copy link
Contributor

@sandycelestica sandycelestica commented Nov 25, 2020

- Why I did it
Some udev scripts has no execute permission under admin which cause the cosutil could not get the prefix.
- How I did it
chmod the permission of popmsg.sh and udev_prefix.sh

- How to verify it
consutil show can show the port list as you rename them

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

- Description for the changelog
Change the platform-modules-haliburton.postinst.Add below:
sudo chmod +x /usr/local/bin/udev_prefix.sh
sudo chmod +x /usr/local/bin/popmsg.sh

- Test log as below
admin@sonic:$ ls
mytty.json
platform-modules-haliburton_0.9_amd64.deb
platform-modules-haliburton_1.0_amd64.deb
admin@sonic:
$ cd /usr/local/bin/
admin@sonic:/usr/local/bin$ ls -l *.sh
-rwxr-xr-x 1 root staff 2054 Jul 31 2020 finalize-warmboot.sh
-rwxr-xr-x 1 root staff 162 Jul 31 2020 host-ssh-keygen.sh
-rwxr-xr-x 1 root root 963 Jan 28 03:45 platform_api_mgnt.sh
-rw-r--r-- 1 root root 227 Aug 17 2018 popmsg.sh
-rwxr-xr-x 1 root staff 6240 Jul 31 2020 swss.sh
-rwxr-xr-x 1 root staff 5981 Jul 31 2020 syncd.sh
-rw-r--r-- 1 root root 485 Aug 17 2018 udev_prefix.sh
admin@sonic:/usr/local/bin$ cd ~
admin@sonic:$
admin@sonic:
$ sudo dpkg -i platform-modules-haliburton_1.0_amd64.deb
(Reading database ... 27246 files and directories currently installed.)
Preparing to unpack platform-modules-haliburton_1.0_amd64.deb ...
Unpacking platform-modules-haliburton (1.0) over (0.9) ...
Setting up platform-modules-haliburton (1.0) ...
Synchronizing state of platform-modules-haliburton.service with SysV service script with /lib/systemd/systemd-sysv-install.
........
admin@sonic:$
admin@sonic:
$ cd /usr/local/bin/
admin@sonic:/usr/local/bin$ ls -l *.sh
-rwxr-xr-x 1 root staff 2054 Jul 31 2020 finalize-warmboot.sh
-rwxr-xr-x 1 root staff 162 Jul 31 2020 host-ssh-keygen.sh
-rwxr-xr-x 1 root root 963 Jan 28 03:45 platform_api_mgnt.sh
-rwxr-xr-x 1 root root 227 Jan 28 03:45 popmsg.sh
-rwxr-xr-x 1 root staff 6240 Jul 31 2020 swss.sh
-rwxr-xr-x 1 root staff 5981 Jul 31 2020 syncd.sh
-rwxr-xr-x 1 root root 485 Jan 28 03:45 udev_prefix.sh

abdosi and others added 30 commits June 16, 2020 10:01
 Add missed BGP tables into the schema (sonic-net#351)
[eeprom] Add try-except to catch the IOError (sonic-net#85)
[sfputilbase.py] Don't try to print EEPROM sysfs file name if we failed
 to read from it (sonic-net#81)
…encing (sonic-net#4788)

* Fix the Build on 201911 (Stretch) where the directory
/usr/lib/systemd/system/ does not exist so creating
manually. Change should not harm Master (buster) where
the directory is created by Linux

* Fix as per review comments
[syncd] Use steady clock for TimerWatchdog (sonic-net#613)
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
…c-net#4705)

* Update to sonic_cfggen and utilities to populate the (pci) device id in the "asic_id" field in the DEVICE_METADATA. This Id is parsed from the file "asic.conf" file in the device/<platform> dir. The format of entries are  eg:  for a 2 ASIC platform.
DEV_ID_ASIC_0=03:00.0
DEV_ID_ASIC_1=04:00.0
 
Going forward will use this device id as the asic instance ID passed to syncd/sai while doing create_switch. Current support is limited, supports only one TD2 platform.
Images built from 201911 branch and installed on devices where we mount /var/lib/docker in RAM (because the HDD is small) were failing as there was not enough space to untar docker.tar.gz . This is due to the increase in total number of containers in the image.

As of today, /var/lib/docker contains 1.1 GB of data. Therefore, this PR increases the size of the ramdisk to 1.3 GB to accommodate all the containers as of now and any new container going forward.
Example output below from an Arista-7050-QX32 SKU:

admin@str-a7050-acs-2:~$ df -h
Filesystem Size Used Avail Use% Mounted on
.....
tmpfs 1.3G 1.1G 221M 84% /var/lib/docker
.....
Verified all docker running fine and interfaces/bgp are up.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
lldp: For multi-npu platforms make sure to add Backplane Interface also
as Interface Match List.
Don't limit iptables connection tracking to TCP protocol; allow connection tracking for all protocols. This allows services like NTP, which is UDP-based, to receive replies from an NTP server even if the port is blocked, as long as it is in reply to a request sent from the device itself.
While migrating to SONiC 20181130, identified a couple of issues:
1. union-mount needs /host/machine.conf parameters for vendor specific checks : however, in case of migration, the /host/machine.conf is extracted from ONIE only in https://github.com/Azure/sonic-buildimage/blob/master/files/image_config/platform/rc.local#L127. 
2. Since grub.cfg is updated to have net.ifnames=0 biosdevname=0, 70-persistent-net.rules changes are no longer required.
Fix for command. show interface transceiver eeprom -d Ethernet (sonic-net#955)
Updated natshow script to support DNAT Pool changes (sonic-net#921)
* added files to create SKU Mellanox-SN3800-D28C50

Co-authored-by: Madhan Babu <madhan@arc-build-server.mtr.labs.mlnx>
* modified files relevant to SKU Mellanox-SN3800-D112C8

Co-authored-by: Madhan Babu <madhan@arc-build-server.mtr.labs.mlnx>
* added files to create SKU Mellanox-SN3800-C64
Co-authored-by: Madhan Babu <madhan@arc-build-server.mtr.labs.mlnx>
Co-authored-by: Madhan Babu <madhan@arc-build-server.mtr.labs.mlnx>
…rm. (sonic-net#4859)

Verified after loading on TH platforms cpu usage gone down:

Previous:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2521 root 20 0 1512860 360452 63540 S 144.6 4.4 8:00.03 syncd

After Fix:
7500 root 20 0 1592420 350912 64184 S 45.4 4.3 3:50.99 syncd
Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
* added files to create SKU Mellanox-SN3800-D24C52

Co-authored-by: Madhan Babu <madhan@arc-build-server.mtr.labs.mlnx>
…#4781)

* Change port index in port_config.ini to 1-based
* Add default port index to port_config.ini, change platform plugins to accept 1-based port index
* fix port index in sfp_event.py
…vice (sonic-net#3690)

* [platform/cel]: add fancontrol service support for dx010

* [device/celestica]: add hysteresis temp to dx010 fancontrol configuration
FDB/ARP/Default routes files are deleted after swssconfig. This
makes debugging/validation of device conversion hard. This PR
saves those files in order to facilitate debugging of device conversion.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
…t#4714)

- Ensure all features (services) are in the configured state when hostcfgd starts
- Better functionalization of code
- Also replace calls to deprecated `has_key()` method in `tacacs_server_handler()` and `tacacs_global_handler()` with `in` keyword.

This PR depends on sonic-net/sonic-utilities#944, otherwise `config load_minigraph` will fail when trying to restart disabled services.
When building the SONiC image, used systemd to mask all services which are set to "disabled" in init_cfg.json.

This PR depends on sonic-net/sonic-utilities#944, otherwise `config load_minigraph will fail when trying to restart disabled services.
judyjoseph and others added 23 commits September 4, 2020 20:35
…-net#5224)

* Add common functions applicable to single/multi asic platforms
* Raise exception if invalid namespace is given as input.
…-net#5269)

* Relocate interface related common functions to py-common
* Add unit tests for interface API's.
sonic-net#5255

Root Cause: Waiting on Restore count != 0 can lead to race condition
between orchagent process and swssconfig.sh.

Ideally check of  Restore count != 0 is not needed as the State DB
cannot be flushed as if it was flushed then Warm Restart or swss-restart
should not be true also.
as needed by SAI 3.7 and above. Without this change
Warmboot fails from 3.5 to 3.7 as Braodcoam Datastructure
gets corrupted after warm-boot.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
…mespace, which is host. (sonic-net#5301)

This would enable the coredump_compress script to retrieve additional info regarding the crashing process.
…-net#5289)

sonic-cfggen is now using Unix Domain Socket for Redis DB. The socket
is created using root account. Subsequently, services that are started
as admin fails to start. This PR creates redis group and add admin
user to redis group. It also grants read/write access on redis.sock
for redis group members.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
Added a function to get hostname. It get it from DEVICE_METADATA|localhost: hostname.
**- Why I did it**

PR sonic-net#4599 introduced two bugs in the startup of the router advertiser container:

1. References to the `wait_for_intf.sh` script were changed to `wait_for_link.sh`, but the actual script was not renamed
2. The `ipv6_found` Jinja2 variable added to the supervisor config file goes out of scope before it is read.

**- How I did it**
1. Rename the `wait_for_intf.sh` script to `wait_for_link.sh`
2. Use the Jinja2 "namespace" construct to fix the scope issue

**- How to verify it**

Ensure all processes in the radv container start properly under the correct conditions (i.e., whether or not there is at least one VLAN with an IPv6 address assigned).
…c-net#5226)

management framework provides management plane services like rest and
CLI which is not needed right after boot, instead by delaying this
service we give some more CPU for data plane and control plane services
on fast/warm boot.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
 [teamsyncd][teammgrd] Graceful exit after receiving SIGTERM (sonic-net#1407)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
  [MultiDB] shoule use multiDB API (sonic-net#57)
 [Thermal] Fix for 'show platform fan' command (sonic-net#71)
  [xcvrd] Return non-zero error code on SFP error (sonic-net#67)
Multi-asic changes commit (PR sonic-net#64 ) into 201911
  [ledd][multi-ASIC] Update to ledd based on sonic-swss-common updates (sonic-net#87)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Multi-Asic changes PR sonic-net#100 , commit into 201911

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
 Update transceiver info DB key names (sonic-net#146)
[Multiasic]: Provide namespace support for ipNetToMediaPhysAddress (sonic-net#129)
[LLDP]: Modify OID index of LLDPRemTableUpdater MIB (sonic-net#155)
[Namespace]: Simplify sync_d functions to use higher order (sonic-net#154)
[Namespace]: Fix interface counters in RFC 1213 (sonic-net#145)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
 Add ip_prefix len based on proxy_arp status (sonic-net#1096)
[sonic-cfggen][QoS][multi ASIC] Multi ASIC QoS and Buffer config
generation support, merge from master (sonic-net#1095)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
[Submodule update] sonic-platform-common
Multi-Asic changes PR sonic-net#100 , commit into 201911

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Parse quagga output without knowledge about hostname, so robust
against hostname changes or mismatch (sonic-net#124)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
 Fix the xcvrd theowing error on sfprecover function
     on getKeys() not valid.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
 update the environment variable in the teardown (sonic-net#1101)
 Fix for show interface portchannel now working on 201911 (sonic-net#1105)
 [201911]show interface counters for multi ASIC devices (sonic-net#1104)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
 [teamsyncd]: Fix LAG add: write MTU configuration. (sonic-net#1423)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
update the environment variable in the teardown (sonic-net#1101)
Fix for show interface portchannel now working on 201911 (sonic-net#1105)
Revert "Pfcstat (sonic-net#1097)"
Revert " [201911]show interface counters for multi ASIC devices
      (sonic-net#1104)"

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@Blueve
Copy link
Contributor

Blueve commented Nov 25, 2020

Hi @sandycelestica ,

Thanks for your update!
For this fix, we need to merge it to master branch first and then decide if pick it back to 201911.
Could you please cherry-pick your change to master branch and then force push again? Otherwise the branch's diff will brings a lot of unrelated changes.

  • reset your branch with current master head
  • cherry pick this commit 6a82828
  • force push branch again

And could you update your PR title with '[Celestica] Grant permission to udevrule scripts for udevprefix.rule generation'?

Thanks,
Jing Kan

Copy link
Contributor

@Blueve Blueve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The change should based on current master branch
  2. Need a more meaningful PR title

See PR discussion thread for detail.

@sandycelestica sandycelestica changed the title 201911 [Celestica] Grant permission to udevrule scripts for udevprefix.rule generation Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[console] udevprefix.conf not generated after plug-on usb console switch