Commit Graph

317 Commits

Author SHA1 Message Date
Taoyu Li
b745c0bf1b Modify sudo lecture message to be more informational (#1800) 2018-06-21 10:41:50 -07:00
Taoyu Li
7557007761 [interface-config] Force eth0 before reconfiguration (#1802) 2018-06-21 10:40:28 -07:00
Denis Maslov
d82db79051 [caclmgrd] Translation of ACL Control Plane rules into iptables commands fixed (#1798)
Signed-off-by: Denis Maslov <Denis.Maslov@cavium.com>
2018-06-19 21:14:49 -07:00
Joe LeVeque
711be8f7da [caclmgrd] Heuristically determine whether ACL is IPv4 or IPv6, use iptables/ip6tables accordingly (#1767)
* [caclmgrd] Heuristically determine whether ACL is IPv4 or IPv6, use iptables/ip6tables accordingly

* Check all rules in table until we find one with a SRC_IP
2018-06-05 03:24:30 -07:00
Qi Luo
eee36719ea
Revert the feature: serial port watchdog service (#1766)
* Revert "[serial watchdog] remove serial watchdog service dependency to rc.local (#1752)"
* Revert "[service] introducing serial port watchdog service (#1743)"
2018-06-04 21:06:58 -07:00
Ying Xie
c1057177d9
[serial watchdog] remove serial watchdog service dependency to rc.local (#1752)
* [serial watchdog] remove serial watchdog service dependency to rc.local

When restarting this service in rc.local, the dependency causes an error
in syslog. Removing the dependency to mute the error log entry.

* remove lines with empty inputs
2018-05-30 18:29:43 -07:00
Taoyu Li
225b3e5b91
Fix a bug that default graph might be missing when generating minimal config (#1747) 2018-05-29 13:46:25 -07:00
Shuotian Cheng
46c2d340ff [docker_image_ctl]: Add --force while removing obsolete dockers (#1744) 2018-05-25 20:04:08 -07:00
Ying Xie
bb6ff62a32
[service] introducing serial port watchdog service (#1743)
* [rc.local] refactor platform identification code to separate function

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [rc.local] infrastructure to take action according to installer.conf

* [serial port watchdog] add service to watch serial port processes

Monitor serial port processes. Kill ones stuck for too long.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [rc.local] start watchdog on serial port specified by installer.conf

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-05-25 10:52:35 -07:00
lguohan
76d9de5d8e
[fast-reboot]: support encoded & gzipped minigraph in fast reboot (#1716)
* [fast-reboot]: support encoded & gzipped minigraph in fast reboot

Signed-off-by: Guohan Lu <gulv@microsoft.com>

* add acl.json and snmp.yml into fast-reboot

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-05-16 10:04:17 -07:00
Andriy Moroz
872f69a566 Update buffers config for Mellanox 27xx devices (#1649)
* Update buffers config for Mellanox 27xx devices

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Remove buffers template test for msn27xx

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-05-08 08:37:35 -07:00
Andriy Moroz
f3426e32dc Decrease usable space in log partition to 90% (#1648)
95 is too close to the edge because by default 5% is already reserved for super-user

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-04-30 11:18:56 -07:00
Prince Sunny
3993e58d1d [updategraph]: Keep updategraph service active after start (#1651) 2018-04-26 15:27:20 -07:00
Joe LeVeque
242f86d2dc [cli]: Update sudoers file to ensure no 'show' commands prompt for sudo password (#1632)
* [sonic-utilities] Update submodule

* Update sudoers file to ensure no 'show' commands prompt for sudo
2018-04-23 13:43:16 -07:00
Taoyu Li
8153ce7f05
[sudoer] Enable read-only commands for all users (#1558) 2018-04-19 11:25:08 -07:00
yurypm
2b9f877b8f [baseimage]: Fix tcpdmatch dependency (#1594)
* Fix tcpdmatch dependency

Issue: sonic_debian_extension.j2 uses tcpdmatch from src folder
       which is result of libwrap build
Fix: added tcpd.deb to build results and extract required files
     from build results

* Install libwrap0 and tcpd deb packages
2018-04-13 17:00:38 -07:00
byu343
27e57c06ab [devices]: Fix the issue of ma1 not found in boot0 for Arista (#1579) 2018-04-10 20:14:45 -07:00
Joe LeVeque
c626dc921f
Allow one Service ACL to bind to multiple services (#1576)
* [caclmgrd] Also ignore IP protocol if found in rule; we will only use our predefined protocols
2018-04-10 18:14:12 -07:00
byu343
ac2861e6d7 [Arista] Set MAC address of mangement port in initramfs (#1565)
* Set MAC address of mangement port in initramfs

* Fix boot0 for running in none-aboot environment
2018-04-06 10:48:13 -07:00
Kebo Liu
ed915e342a [build templates] Add environment variables for mellanox syncd container to support mellanox sdk and prm sniffer. (#1551)
modified:   files/build_templates/docker_image_ctl.j2

  Signed-off-by:  Kebo Liu kebol@mellanox.com
2018-04-02 20:24:59 -07:00
lguohan
11b0cd93e8
[baseimage]: bring down eth0 before restart networking (#1555)
cfggen generates new eth0 configuration. Need to first
clean existing configuration on eth0 before bring up
new configuration on eth0. Thus, we need to first bring
down eth0 before putting new configuration into /etc/network/
interfaces

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-04-01 21:36:43 -07:00
Taoyu Li
208ca43760
[hostcfgd] Fix a bug that tacacs key is wrongly modified (#1536) 2018-03-28 10:55:59 -07:00
Taoyu Li
4daf002859 [updategraph] Remove pending_initialization flag after first boot (#1538) 2018-03-28 09:06:48 -07:00
Jipan Yang
f74de8914b [telemetry]: SONiC system telemetry Support (#1526)
* SONiC system telemetry Support

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update package name from telemetry to sonic-telemetry

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-03-27 13:39:04 -07:00
Volodymyr Samotiy
da42bd75a8 [config]: Apply CRM default config to DB on start (#1534)
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2018-03-27 13:37:02 -07:00
padmanarayana
dba35eebb1 [baseimage]: Updategraph during NOS->SONiC migration (#1521) 2018-03-23 15:16:54 -07:00
sihuihan88
6d592d8329 [build_template]: combine the init config write into one block (#1513)
Signed-off-by: Sihui Han <sihan@microsoft.com>
2018-03-19 17:44:16 -07:00
lguohan
56efb41f55
[image]: remove quote for build_version in /etc/sonic/sonic_version.yml (#1512)
commit 0965b33 added quote to build_version in /etc/sonic/sonic_version.yml,
e.g., sonic_version : '20170104.10'. scripts to use the $sonic_version need
to remove the quote.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-03-19 00:53:47 -07:00
Joe LeVeque
e6278c1e0e
[radv] Rename service unit file Jinja template to radv.service.j2 (#1480)
- Service unit file not getting generated because I changed the docker
    container name from 'router_advertiser' to 'radv', however I didn't
    rename the service unit file template name to match. However,
    slave.mk generates a service file for every docker based on its
    container name, and since there was no matching 'radv.service.j2'
    template file, this file stopped getting generated and therefore
    the docker container was never getting started.

  - Also add swss.service to 'Requires'
2018-03-09 23:01:49 -08:00
Taoyu Li
e84e093dea
Move all minigraph-related action from rc.local to updategraph (#1452)
- Move all minigraph-related action from rc.local to updategraph
- updategraph service is now after database. All feature services are now after and depending on updategraph
2018-03-09 17:17:08 -08:00
padmanarayana
02b62ac9bb [fast-reboot]: Support OS9 -> SONiC fast-reboot migration (#1414)
* Support OS9 -> SONiC fast-reboot migration

* Address review comments. Update NOS mac in EEPROM and net.rules for eth0

* Address review comments. Update sonic-platform-modules-dell to fac81d...

* Fix script for POSIX compliance
2018-03-08 16:42:41 -08:00
Samuel Angebault
e18e15f31b [Aboot] refactor boot0.j2 for Aboot bootloader (#1445)
Now properly differenciate the image installation and the kexec
operations. This is useful for fast-reboot operations.

Minor updates include
 - better command line management
 - using partition UUID in the command line
2018-03-07 15:28:14 -08:00
sihuihan88
7639cc1b53 [pfcwd]: add flag to enable pfc wd on start (#1429) 2018-03-05 23:55:37 -08:00
Taoyu Li
09f2385a15 [hostcfgd/tacacs] obfuscate tacacs credentials in syslog (#1444) 2018-03-02 21:24:01 -08:00
lguohan
a9d2e13627
[image]: prevent password related command into syslog (#1450)
* [image]: prevent password related command into syslog
2018-03-02 21:21:25 -08:00
Ying Xie
720c71399c
Improve: buffer configuration infrastructure (#1403)
* [sonic build] Define folder macro for target folder /usr/sonic/share/templates

* [sonic-cfggen] allow templates to include from common folders

- Allow templates to include files under /usr/share/sonic/templates
- Allow templates to include files in the same folder as the root template

* [Buffer config] install the buffer configuration template

* [Arista7260cx3] Add buffer configuration for Arista7260CX3 T0 topology

- pg profile look up table is incomplete. Currently contains T0 default
  values.

* [Arista7260cx3] Adding QoS configuration

* Address review comments

1. Stop generating ingress pg configuration for lossless pgs.
2. Stop putting ports into speed sets, put all ports in one set.
3. Remove ingress lossless profiles.
4. Added some tailing '-' back to remove leading spaces.
2018-02-27 12:15:56 -08:00
pavel-shirshov
43a98393e9
Error fix: The function can't have empty body in bash (#1420) 2018-02-26 17:42:20 -08:00
pavel-shirshov
ec537be065
[Submodule update]: Update submodule sonic-utilities (#1407)
* Update submodule sonic-utilities

* Copy fast-reboot json dumps from /host filesystem

* Update sonic-utilities to latest

* Fix typo
2018-02-26 11:23:29 -08:00
lguohan
005a59fc4d
[image]: Upgrade SONiC stack to use SAI version to v1.2 (#1336) 2018-02-22 19:36:39 -08:00
nikos-li
5a0e42307f [baseimage]: Suppress sonic WARNING rsyslogd-2007: action 'action 6' suspended syslog message (#1400) 2018-02-22 19:32:18 -08:00
Taoyu Li
04b694454a
[sonic-cfggen] Remove machine.conf info and add get_system_mac support (#1397)
[sonic-cfggen] Remove machine.conf info and add get_system_mac support
2018-02-20 14:38:13 -08:00
lguohan
f657df7588
[baseimage]: enable auto logout for console (ttyS*) sessions (#1398) 2018-02-20 09:36:54 -08:00
Joe LeVeque
6ccd1601b8
Modify Arista service ACL solution to listen to ACL changes in ConfigDB (#1385) 2018-02-12 11:10:01 -08:00
byu343
ecf5c8d311 ssh and snmp allow list (#1363)
- Service ACL framework for Arista platforms
2018-02-08 17:43:52 -08:00
Ying Xie
2b48886eec
[config] activate qos configuration only when buffers configuration exists (#1378) 2018-02-07 13:38:09 -08:00
padmanarayana
0d0752e099 Reduce SONiC migration partition from 8G to 1G. (#1343)
* Reduce SONiC migration partition from 8G to 1G.

* Changes to create 1G partition with ability to resize post migration.

* Remove redundant changes in varlog

* Use findfs to interpret root. Move resize in case cmdline params are reordered
2018-02-07 22:07:01 +08:00
kaiyu22
d0dd80c6d3 [Nephos] Update SDK version to 3.16.0-5 in swss.service.j2 (#1377)
- What I did
Updating SDK version from 3.16.0-4 to 3.16.0-5

- How I did it
Updating SDK version in files/build_templates/swss.service.j2

- How to verify it
Checking command "config load_minigraph" without errors

- Description for the changelog
Updating SDK version from 3.16.0-4 to 3.16.0-5 in swss.service.j2

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

Signed-off-by: Sam Yang <yang.kaiyu@gmail.com>
2018-02-07 20:09:14 +08:00
Ying Xie
58c479d3af
[boot] log rc.local execution in syslog (#1375) 2018-02-06 14:59:15 -08:00
Joe LeVeque
162089dd9e
[caclmgrd] Prevent service from blocking system boot indefinitely (#1362) 2018-02-01 15:15:39 -08:00
Qi Luo
358949b4e5
Upgrade linux-image version (#1294)
* Upgrade linux-image version
* Add missing dependency of igb
* Fix mft build rule
* Add missing dependency of ixgbe
* [Broadcom]: Update OpenNSL modules to be compatible with kernel 3.16.0-5 (#3)
* [Nephos] Update SDK version to support new kernel module 3.16.0-5 (#4)
* [mellanox]: Update URL for SDK (#5)
2018-01-31 11:39:48 -08:00
Ying Xie
673c82f9a3
[dhcp_relay] complete the dhcp_relay service dependency towards teamd (#1356)
This change makes sure that the dhcp_relay service will be started
after teamd service is started from a stopped state.
2018-01-30 17:30:38 -08:00
Joe LeVeque
a36527a6a5
Store ConfigDB init indicator boolean value as 1/0 in Redis to be language-agnostic (#1352) 2018-01-30 15:04:52 -08:00
Ying Xie
474b3f08e7
[dhcp_relay] make dhcp_relay service depends on teamd as well (#1348)
When teamd service restarted, the port channels will be recreated.

Dhcp relay service needs to be restarted after that to listen on the
right port channels.
2018-01-29 16:26:54 -08:00
Andriy Moroz
58d8302b53 Buffers configuration update on port speed change (#1345)
* Move buffer configuration to ConfigDB

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Converted Dell and Arista configs

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add buffer configs for ACS-MSN2740

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Updated buffers template

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fixed j2 unit test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config for Force10-S6100

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update VS docker to support speed and buffers test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config generation

- fixed support of sonic-to-sonic install

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update submodules pointers for buffers config

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-01-29 08:11:05 -08:00
Ying Xie
2b91c9681d Revert "Buffers configuration update on port speed change (#1250)" (#1340)
This reverts commit 814e50fd5e.
2018-01-26 10:13:43 -08:00
Andriy Moroz
814e50fd5e Buffers configuration update on port speed change (#1250)
* Move buffer configuration to ConfigDB

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Converted Dell and Arista configs

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add buffer configs for ACS-MSN2740

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Updated buffers template

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fixed j2 unit test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config for Force10-S6100

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update VS docker to support speed and buffers test

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update buffers config generation

- fixed support of sonic-to-sonic install

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2018-01-26 08:09:31 -08:00
pavel-shirshov
8cfa223ef9 [scripts]: Fix issues with checking status of the DB. Use one approach everywhere. (#1323) 2018-01-18 19:55:11 -08:00
Joe LeVeque
134707f822
Move platform-specific hardware plugin base packages to sonic-platform-common submodule (#1301) 2018-01-17 17:11:31 -08:00
pavel-shirshov
22a3e4817a Run docker containers with /tmp and /var/tmp mounted to tmpfs (#1313) 2018-01-16 23:20:13 -08:00
lguohan
b8a0a10e8d
[baseimage]: add mkfs.ext3 and fsck.ext3 in initrd to support ext3 partition (#1306) 2018-01-16 10:50:43 -08:00
Joe LeVeque
0fffa6c63b
Add caclmgrd and related files to translate and install control plane ACL rules (#1240) 2018-01-09 17:55:10 -08:00
lguohan
15d433d975
[build]: allow to use http(s) proxy in the build (#1265)
* allow to use http(s) proxy in the build

To enable this, use following command
http_proxy=[your_proxy] https_proxy=[your_proxy] make
2017-12-23 23:34:15 -08:00
kaiyu22
63de341dd6 [Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC (#1245)
* Add switch ASIC vendor and platforms for Nephos

- What I did
Add switch ASIC vendor: Nephos
Add Nephos platforms: Ingrasys S9130-32X, Ingrasys S9230-64X

- How I did it
Add platform/nephos files
Add platform/nephos/sonic-platform-modules-ingrasys submodule
Add device/ingrasys/x86_64-ingrasys_s9130_32x-r0 files
Add device/ingrasys/x86_64-ingrasys_s9230_64x-r0 files
Add SONiC to support Nephos platform

- How to verify it
To build SONiC installer image and docker images, run the following commands:
make configure PLATFORM=nephos
make target/sonic-nephos.bin
Check system and network feature is worked as well

- Description for the changelog
Add switch ASIC vendor and platforms for Nephos

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

Signed-off-by: Sam Yang <yang.kaiyu@gmail.com>

* Advance sonic-sairedis submodule to include #271 (Add Nephos ASIC)
2017-12-22 10:04:29 -08:00
Joe LeVeque
c898a04b28
[sudoers] Add 'docker ps' to READ_ONLY_CMDS (#1259) 2017-12-21 11:03:08 -08:00
Marian Pritsak
ab2d066a4d [snmp]: Save S/N in state DB prior to starting service (#1246)
snmp.service needs to read chassis serial number for one of its mibs.
We save this value in state DB so that it is accessible from container.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-12-19 16:02:26 -08:00
Liuqu
dce6d3536b [TACACS+]: Add configDB enforcer for TACACS+ (#1214)
* [TACACS+]: Add configDB enforcer for TACACS+

* hostcfgd - configDB enforcer for TACACS+, listen configDB to
  modify the pam configuration for Authentication in host
* Add a service script for hostcfgd

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>

* [TACACS+]: Generate conf file by template file

* Generate common-auth-sonic and tacplus_nss.conf by jinja2 template

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
2017-12-12 03:45:44 -08:00
Liuqu
8383b1f256 [TACACS+]: Add support for TACACS+ Authentication (#1019)
* [TACACS+]: Add support for TACACS+ Authentication

* pam_tacplus - A TACACS+ protocol client library and PAM module to
  supports core TACACS+ functions for AAA.
* nss_tacplus - A NSS plugin for TACACS+ to extend function getpwnam,
  make the TACACS+ authenticated user which is not found in local
  could login successfully.

* Add make rules for pam_tacplus and install script
* Add a patch for pam_tacplus to disable pam-auth-update pam-tacplus
  by default
* Add a patch for pam_tacplus to inlucde and build nss_tacplus

  Signed-off-by: chenchen.qcc@alibaba-inc.com

* [TACACS+]: Add nss-tacplus as a separate src repo

* Separate nss-tacplus from pam-tacplus, modify tacacs.mk and
  makefile, add a patch to adapt to the new user map profile.
* Use the lastest stable version for pam-tacplus, add a dependent
  package in sonic-salve, add two patches to fix build error.
* Add scripts to disable tacplus by default.
* Remove hostcfgd service file

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>

* [TACACS+]: Fix nss-tacplus filter some valid TACACS+ username

* The NAME_REGEX for username check in plugin nss-tacplus is
  the ANSI version "^[0-9a-zA-Z_-\ ]*$", but the regular expression
  in /etc/adduser.conf is not defined as ANSI version. To avoid
  nss-tacplus filter some valid TACACS+ username, remove username
  check.

  Signed-off-by: Chenchen Qi <chenchen.qcc@alibaba-inc.com>
2017-12-07 03:36:17 -08:00
Prince Sunny
744927acd3
Derive varlog size based on total flash size (#1209) 2017-12-06 15:13:18 -08:00
lguohan
b907e4e9f5
[vs]: add vlan configuration support in virtual switch (#1200) 2017-11-30 14:59:25 -08:00
Samuel Angebault
7f25b94378 [aboot]: Add setfacl in the initramfs (#1185)
Arista platforms need the filesystem ACLs to be removed on boot to
prevent invalid permission to be set for new files.
2017-11-24 17:30:11 -08:00
Taoyu Li
617b3e43b1
Add service to config hostname based on configdb (#1174) 2017-11-22 14:36:25 -08:00
Andriy Moroz
6d0329af3d Move QoS configuration to Config DB (#1178)
* Move Mellanox QoS configuration to config DB

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Move qos.json to hwsku subfolder

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Remove copying of old qos config

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Update WRED threshold values

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* hwsku2

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fix syntax error in json

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Add qos config for some Dell and Arista platforms

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fix inital qos config on clean boot

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Updated swss-common and swss pointers (QoS in Config DB)

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2017-11-22 08:58:22 -08:00
Samuel Angebault
21764008da [Aboot] Declare flash_size for all platform (#1171)
The flash_size parameter can then be used to compute the varlog_size
2017-11-22 02:58:20 -08:00
Taoyu Li
c5eba7dd34 [baseimage]: Fix racing condition between updategraph and rc.local (#1175) 2017-11-22 00:51:05 -08:00
lguohan
df529efef7
[baseimage]: fix mac address calculation on mellanox and centec platform (#1166) 2017-11-20 10:05:08 -08:00
Joe LeVeque
cea87e985c
Add docker-router-advertiser to support IPv6 router advertisements (#1103) 2017-11-14 14:40:15 -08:00
Prince Sunny
803c263331 [baseimage]: Subnet route added for management interface (eth0) - "fixes #1023" (#1142)
* Added management subnet route to route table-default in kernel.

* Added sample output to interface file
2017-11-14 08:19:24 -08:00
Ying Xie
764cb913f1
[Arista7260cx3] Increase /var/log partition size to 4G (#1140) 2017-11-10 15:47:38 -08:00
Haiyang Zheng
a69b353630 [interfaces.j2] Get mtu value from config DB if provided (#1128)
Signed-off-by: Haiyang Zheng <haiyang.z@alibaba-inc.com>
2017-11-10 13:54:31 -08:00
Marian Pritsak
c64d423fec [rc.local]: Fix init_cfg.json (#1129)
If device MAC is added to init_cfg.json, it has to be done using
intermediate file. We cannot redirect to same file while trying to read
from it because it will be truncated first.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-11-08 08:50:22 -08:00
Taoyu Li
f7c39720f7
Restart ntp after ntp-config (#1106)
* Restart ntp after ntp-config
* Remove ntp dependency to ntp-config
2017-11-07 14:51:07 -08:00
lguohan
1ce9b85e3c
[init]: save the initial switch mac to config db (#1125)
* [init]: save the initial switch mac to config db

Save the initial switch mac to config db DEVICE_METADATA|localhost entry.

* update sonic-swss submodule
2017-11-06 23:40:27 -08:00
JipanYanga
7406d3709b [configdb]: Add support for vlanconfd and intfconfd (#1063)
* Add support for vlanconfd and intfconfd

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Change name to vlanmgrd and intfmgrd

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Add missing vlan_members for parse_dpg result

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Remove cfgmgr debug CLI from image

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update swss and swss-common submodules for VLAN trunk support

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2017-11-05 22:37:16 -08:00
JipanYanga
84cbfd5bbc [configdb]: Store switch mac to configDB switch table (#1108)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2017-11-05 00:31:29 -07:00
Samuel Angebault
ca214b947c [arista]: Bump sonic-platform-modules-arista submodule (#1111)
* Bump sonic-platform-modules-arista

Improves i2c performance for xcvrs
Fix the led_plugin by ignoring unknown ports
Miscellaneous improvements

* Fix index column for Arista-7260CX3-D108C8

* Fix flash permissions for Arista platforms

The ext4 flash uses acl to properly handle permissions in EOS.
Aboot isn't built with this support and therefore can't be used
to set the flash permissions. It has to be deferred in sonic initrd.
2017-11-03 15:22:05 -07:00
Shuotian Cheng
06c0f7d2e8 Revert "[ntp]: Restart ntp after ntp-config (#1098)" (#1102)
This reverts commit c832f2af62.
2017-11-01 18:40:33 -07:00
Taoyu Li
c832f2af62 [ntp]: Restart ntp after ntp-config (#1098) 2017-10-31 22:20:18 -07:00
byu343
d7d6c41184 [Arista]: Fix the udev waiting in networking start (#1093)
* [Arista]: Fix the udev waiting in networking start

This change is to fix the issue in https://github.com/aristanetworks/sonic/issues/16
For the checking condition used, it is only applied to Arista switches

Signed-off-by: Boyang Yu <byu@arista.com>

* [Arista]: Correct for PR comments

Signed-off-by: Boyang Yu <byu@arista.com>
2017-10-30 18:04:40 -07:00
Taoyu Li
a7ea0556c8 [updategraph]: Support a special value to use empty configuration (#1086)
When updategraph service is enabled, a special value 'default'
from DHCP response will now initialize the system with an empty
configuration instead of existing minigraph.

A DHCP response without option 224 will remain the current behavior
of skipping graph update and use existing default minigraph.
2017-10-27 18:01:02 -07:00
Joe LeVeque
37dc7bd478 [interfaces]: Set hwaddr of VLAN interfaces to system MAC upon creation (#1042) 2017-10-16 17:36:21 -07:00
Hnydyn Nazar
118c2dd39d [ntp]: Fix NTP sync while using DHCP (#1035) 2017-10-13 17:08:35 -07:00
Shuotian Cheng
dbced4fb77 [snmp]: Add swss dependency for snmp service (#1034)
- snmp service needs swss to be ready to get the port counter map

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2017-10-12 00:28:16 -07:00
Marian Pritsak
ecd99c73d1 [swss]: Flush flex counter DB in swss_serivce.j2 (#1029) 2017-10-10 12:49:06 -07:00
lguohan
dc0f3ceb5c add version tag for the docker images (#1021)
docker images are also tagged with the same image version.
2017-10-08 02:10:14 -07:00
Joe LeVeque
8a305ce9c9 [sonic-utilities]: Build as Debian package once again (revert change to wheel) (#1018) 2017-10-06 12:46:47 -07:00
Joe LeVeque
1cd9818fe9 [build]: sonic-utilities package depends on swsssdk; build as wheel and add build dependency (#1011)
* [build]: sonic-utilities package now depends on swsssdk; add build dependency

* Now building sonic-utilities Python package in wheel format

* Update sonic-utilities submodule

* Change output wheel name to match proper format
2017-10-04 19:50:39 -07:00
Volodymyr Samotiy
763205ff7d [config]: Fix management interface configuration (#966)
* [config]: Fix management interface configuration

* [config]: Fix management interface configuration

* Fix comments
2017-09-20 23:55:50 -07:00
Prince Sunny
72f5d6bcb7 [interfaces]: Change MTU value to 9100 (#967)
* Updated MTU to the widely used value with other devices
2017-09-19 19:29:00 -07:00
ravijo2
458093fee5 Framework to plugin Organization specific scripts during ONIE Image build (#951)
* Framework to plugin Organization specific scripts

* Framework to plugin Organization specific scripts

* Framework to plugin Organization specific scripts

* add getopt option to organization script
2017-09-19 16:23:31 -07:00
padmanarayana
6935e00909 [build/onie installer] Install grub for SONiC post migration from another NOS (#949)
* Install grub for SONiC post migration from another NOS

* Install grub from bundled debian package instead of using ONIE's. Address review comments
2017-09-17 11:41:29 -07:00
Ying Xie
56ae5edc7f [service template] Starting new docker when HWSKU change is detected (#946)
Existing dockers has paths mounted according to the HWSKU. When HWSKU
changes, these dockers need to be destroyed and recreated with the
correct paths mounted.
2017-09-14 08:43:02 -07:00
Taoyu Li
c9cc7aea41 [configdb] Migrate minigraph configurations to DB (#942)
Modify minigraph parser output format so it fit DB schema
Modify configuration templates to fit new schema
Systemd services dependencies are modified so database starts before any configuration consumer
2017-09-12 14:13:27 -07:00
Marian Pritsak
8f1ac5d5ec [rsyslog]: Use timegenerated instead of timestamp (#944)
* [rsyslog]: Use timegenerated instead of timestamp

This is useful when rsyslog is used to put markers generated on other machines.
This way all messages will have a timestamp from a single system.

* [rsyslog] Use subseconds from local machine
2017-09-08 18:25:25 -07:00
Marian Pritsak
e418675ba5 [rsyslog]: Use SONiC template in containers (#940) 2017-09-07 13:01:20 -07:00
lguohan
116ba4b180 [baseimage]: allocate varlog disk in the initramfs stage (#936)
moving to initramfs unifies disk allocate on different platforms.
use fallocate instead of dd to speed up the disk allocation.

By default, mkfs.ext4 has -E discard option which discards the blocks
at the mkfs time, also speed up the initialization time.
2017-09-06 20:07:32 -07:00
padmanarayana
2d3b064437 [image]: build sonic-broadcom.raw image for sonic conversion from ftos (#901)
1. "make target/sonic-broadcom.raw" will create the compressed dd'able image.
2. This will also update the grub config files (device/dell/*/nos_to_sonic_grub.cfg) with the image versions.
2017-08-27 20:13:38 -07:00
Oleksandr Ivantsiv
7c75030cea [mlnx-fw-upgrade]: Define required FW version in build time. (#902)
- Do not query required FW from file.
2017-08-22 08:08:07 -07:00
byu343
a92f5a9ffe Add arista-net initramfs hook (#899) 2017-08-19 21:32:10 -07:00
Joe LeVeque
178fc032ae [sfputil]: Add support for SFP presence, low-power mode and reset (#877)
- Update sfputil plugins for Dell FORCE10-S6000, Arista 7050-QX-32, 7050-QX-32-S
2017-08-11 11:36:32 -07:00
Joe LeVeque
9d5adb993a [System logs]: Improvements to prevent filling /var/log partition (#865)
- Force log rotation at size thresholds only (no longer also rotating logs daily), allowing for more consistent archived log size
- Eliminate remaining duplicate log messages
- Cron facility now only logs to cron.log (was also logging to syslog)
- Debug, mail, news and user log facilities only log to syslog; no longer creating separate log files for these facilities
- Cron job that calls logrotate every minute now uses the main /etc/logrotate.conf file so as to check/rotate all logs every minute, not just the logs specified in the rsyslog file. Also redirecting output of this command to /dev/null to prevent "(CRON) info (No MTA installed, discarding output)" messages in cron.log due to lack of a mail service
- Delete archive files based on remaining /var/log partition space. Note that this solution currently requires a minimum /var/log partition size of 32MB to function correctly
- Update sonic-sairedis and sonic-swss submodules to incorporate recording file name changes
- Add .screen file to .gitignore (unrelated)
2017-08-10 16:24:57 -07:00
Taoyu Li
a2fe0212be [ConfigDB] Move all BGP configuration into DB (#861)
- BGP data read from minigraph.py now match DB schema
- BGP templates are updated
- bgpcfgd can now deal with runtime neighbor create/delete
2017-08-08 16:23:58 -07:00
Samuel Angebault
97e4360d9b [platform] Add support for Arista DCS-7260CX3-64 (#863)
* Update sonic-platform-modules-arista submodule

* Update boot0 to handle DCS-7260CX3-64

* Add sys eeprom plugin for DCS-7260CX3-64

* Add sfputil plugin for DCS-7260CX3-64

* Add sensors config for DCS-7260CX3-64

* Add Arista-7260CX3-64 HwSku port_config

* Handle slow flash partition re-read

* Add minigraph.xml for DCS-7260CX3-64 64x100G
2017-08-05 20:56:32 -07:00
Taoyu Li
b6efe438b5 Introduce ConfigDB (#808)
* [cfggen] Support reading from and writing to configdb
* [bgp] Move bgp_admin_state to configdb, support dynamic admin state change
* [sonic-utilities] Adapt configDB for admin status, support config save and config load
2017-08-01 19:02:00 -07:00
Oleksandr Ivantsiv
382d52843f [mellanox]: Move FW upgrade script to base image. (#849)
- Download files to target/files directory (instead of target/debs)
- Clean python-weels log files
2017-07-28 10:57:51 -07:00
Taoyu Li
829a205b85 [config services] Not to block syslog service on minigraph update (#850) 2017-07-27 19:52:22 -07:00
Joe LeVeque
f49cac086f Remove extra trailing newlines at EOF (#804)
Files now end with a single newline
2017-07-12 20:54:37 -07:00
pavel-shirshov
a78d3b1a9f [base]: allow-hotplug is enough in /etc/network/ifaces. auto is not required (#781) 2017-07-05 13:50:21 -07:00
sihuihan88
3268946de5 [BGPD]: add bgp dynamic neighbor configuration (#708)
* add bgp dynamic neighbor configuration

* [bgpd]: update as comments

* update as comment

* update to deployment_id_asn_map

* minor change
2017-06-21 18:52:50 -07:00
Taoyu Li
95906a6490 [installer] Copy old config files rather than only minigraph (#730) 2017-06-21 11:02:25 -07:00
lguohan
493edb4584 [image]: add debian security update in the apt source list (#724) 2017-06-19 22:16:05 -07:00
lguohan
4a780f4a6a [submodule]: update swss/sairedis/swss-common submodule (#716)
fix bug for logrotate sairedis log
2017-06-18 16:54:13 -07:00
Qi Luo
88b98c7b89 [image]: Update login message (#706) 2017-06-14 15:18:02 -07:00
Shuotian Cheng
8843c6f192 [logrotate]: Add /var/log/swss/*.rec to logrotate target (#703)
SwSS record files in /var/log/swss/ folder get larger and
larger and were not rotated. Add them here to rotate these files.
2017-06-14 07:05:34 -07:00
Taoyu Li
5e6620e19e [bgp] Save bgp admin state (#690)
* [bgp] Save admin state and set default state to shutdown

* Set default behavior to no shutdown

* Add build option SHUTDOWN_BGP_ON_START

* Script change for default admin state to be on

* Address CR comments to bgp_neighbor script

* Fix script bug
2017-06-12 11:05:22 -07:00
Taoyu Li
cefd024c26 Kill dhclient when reconfig interfaces (#683) 2017-06-08 01:50:04 -07:00
lguohan
ea4dfa48c9 Revert "[baseos] Avoid disconnecting mgmt when re-cfg interfaces" (#681)
This reverts commit e74196cd75.
2017-06-07 10:37:49 -07:00
Taoyu Li
e74196cd75 [baseos] Avoid disconnecting mgmt when re-cfg interfaces (#553)
* [baseos] Avoid disconnecting mgmt when recfg interfaces

* Kill dhclient after interfaces-config
2017-06-06 17:12:26 -07:00
lguohan
b968cf73a1 [aboot]: use pipe to extract docker archive to save disk space (#677) 2017-06-06 10:41:06 -07:00
Samuel Angebault
7d33387e7c [platform] Complete support for Arista-7050QX-32S (#661)
* Bump sonic-platform-modules-arista submodule

* Use sonic_sfputil plugin from the arista library

* Fix undefined variable varlog_size

* Prevent minigraph.xml to be removed from the flash

* Update DCS-7050QX-32 sensors config
2017-06-02 01:31:53 -07:00
Joe LeVeque
e0d22acc9e [DHCP Relay]: Wait for all interfaces to come up before starting DHCP relay (#660) 2017-06-01 18:38:33 -07:00
Joe LeVeque
b0c99338a1 [Aboot]: Add '--numeric-owner' when untarring docker filesystem to preserve original owners (#653) 2017-05-31 19:27:47 -07:00
lguohan
17f0633143 [image]: change mtu to jumbo size 9216 by default (#641) 2017-05-28 00:36:34 -07:00
Taoyu Li
bd52f411ff [interfaces]: Use default table instead of main table for forced_mgmt_routes (#635)
If routes are inserted in main table, they wont' be overwritten
by the routes learned via BGP. Then the routes will be missing
from the ASIC.
Thus a default table is used so that control plane and data plane
routes are isolated and could be configured independently.
2017-05-27 01:14:58 -07:00
Joe LeVeque
714e45f0bb Cron jobs log to /var/log/cron.log once again (#620)
- Now that logrotate is a cron job that runs every minute, it was polluting syslog
 - Also shrink max size of less-important logs to 50MB and rotate them daily by default
2017-05-23 10:29:54 -07:00
Joe LeVeque
72b8284e57 Update sonic-utilities submodule; Add commands to sudoers as necessary (#608) 2017-05-17 13:02:17 -07:00
Joe LeVeque
910e666798 Add /usr/bin/generate_dump to sudoers file; Update sonic-utilities submodule (#603) 2017-05-15 14:32:39 -07:00
Taoyu Li
7663da9510 Disable updategraph after first time (#592) 2017-05-11 12:37:14 -07:00
Joe LeVeque
6393afdb0b [sonic-utilities]: Update submodule (#581) 2017-05-10 12:39:00 -07:00
Qi Luo
6cab3bc852 Add rotation feature to docker logs (#563)
* Add rotation feature to docker logs

* Fix: only apply log rotation for json-file log driver
2017-05-05 17:44:36 -07:00
lguohan
72a039b1de [aboot]: refactor boot0.j2 to support one image SONiC-to-SONiC upgrade (#557)
* [aboot]: refactor boot0.j2 to support one image upgrade

* support sonic_installer in aboot
2017-05-01 15:16:33 -07:00
Marian Pritsak
d597418b6c [rc.local]: Copy saved minigraph if available. (#533)
* [rc.local]: Copy saved minigraph if available.

In case of sonic-to-sonic update old image stores minigraph under /host
directory. Upon first boot this minigraph will be used by new image to
save configuration.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-04-26 11:41:18 +03:00
lguohan
147b89fa43 [sonic-utilities]: update sonic-utilities to use redis-load-dump to dump redis db data (#530) 2017-04-25 11:07:54 -07:00
Joe LeVeque
f28790ce9a [System logs]: Fix logrotate bugs (#535)
- rsyslog logs were being rotated regardless of whether they exceeded their maixmum size. This was due to "-f" flag passed to logrotate in cron job.

- After rotation, /var/log/syslog was never written to again. Instead, logs were written to /var/log/syslog.1. This was due to rsyslog not properly closing the file descriptor to the pre-rotated log.

- Also brought back time-related rotation via the new(er) maxsize option, which performs a boolean OR operation. If the log exceeds the maxsize OR the log hasn't been rotated in the specified, it will be rotated. Using the older size option, the time-based rotation was ignored.

- Also addresses issue #528
2017-04-24 17:55:05 -07:00
lguohan
34adb715df [oneimage]: use loop variable to get image dir in /proc/cmdline for aboot image (#534) 2017-04-24 13:39:29 -07:00
Andriy Moroz
b549adc36c [image]: SONiC-to-SONiC update (#464) 2017-04-21 17:23:36 -07:00
Joe LeVeque
6c202919b3 [System logs]: Eliminate duplicate log messages and attempt rotation more frequently (#520)
* Rename 'ACSFileFormat' -> 'SONiCFileFormat'

* Rename '00-acs.conf' -> '00-sonic.conf'

* Add logrotate.d and systemd-journald config files to image

* Log all SONiC process messages to /var/log/syslog; prevent duplicate logging to /var/log/messages

* Do not redirect cron and daemon logs to their own files, let them log to /var/log/syslog

* Log all teamd messages to /var/log/teamd.log; Add more SONiC program names to SONiC rules clause

* Remove duplicate code by condensing quagga programs into a list; Fix teamd log rule

* Kernel and LPR messages no longer getting duplicated to their own log files

* Now calling logrotate every minute via cron job

* Need full path to logrotate in cron job

* Add '.log' suffix to wildcards, otherwise logrotate will rotate already-rotated logs (e.g., bgpd.log.1.1.1.1.1...)

* Add microsecond granularity to syslog messages

* Don't overwrite system crontab, instead, install additional logrotate crontab file into /etc/cron.d

* Removed incomplete concept of per-process SONiC logs. We can revisit again later
2017-04-21 08:22:44 -07:00
Shuotian Cheng
b305a50a78 [interfaces]: Bring up LAG members before they are enslaved (#505)
Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-04-13 23:54:44 -07:00
Marian Pritsak
884bd2d467 [mellanox]: Add support for Mellanox MSN2410 (#491)
* [device]: Add support for Mellanox MSN2410
MSN2410 runs on Spectrum silicon and has 56 ports:
48 25GbE and 8 100GbE
* Avoid full path within bash -c

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-04-10 14:36:36 -07:00
lguohan
1458e9ea6b [aboot]: add varlog limit file in aboot image (#487)
* [aboot]: add varlog limit file in aboot image
2017-04-07 15:28:30 -07:00
Shuotian Cheng
eef859baf9 [interfaces]: Do not bring up LAG members when LAG is not up (#480)
- Do not bring up LAG member ports when LAG is not created.
  This is because LAG member ports must be DOWN when joining
  the teamd instances due to teamd design. Therefore, we cannot
  bring up a LAG member port first and then join the port to a LAG.

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
2017-04-05 16:22:19 -07:00