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

[build]: print error message when use root or sudo to build. #1923

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

lguohan
Copy link
Collaborator

@lguohan lguohan commented Aug 13, 2018

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

- What I did
print error message when use root or sudo to build.

- How I did it

- How to verify it

lgh@gulv-vm1:/data2/sonic/stretch/sonic-buildimage$ sudo make
Makefile:29: *** Add your user account to docker group and use your user account to make. root or sudo are not supported!.  Stop.
lgh@gulv-vm1:/data2/sonic/stretch/sonic-buildimage$ sudo bash
root@gulv-vm1:/data2/sonic/stretch/sonic-buildimage# make
Makefile:29: *** Add your user account to docker group and use your user account to make. root or sudo are not supported!.  Stop.

- Description for the changelog

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

Signed-off-by: Guohan Lu <gulv@microsoft.com>
@lguohan lguohan merged commit e15cf2d into sonic-net:master Aug 14, 2018
prsunny pushed a commit that referenced this pull request Oct 18, 2021
Sonic-swss-common:

[schema.h] Add trap flow counter support (#534) (sonic-net/sonic-swss-common@31f4253)
[schema] Add CBF table names (#525) (sonic-net/sonic-swss-common@b15e08d)

Sonic-sairedis:

[cbf] Add Class Based Forwarding support (#909) sonic-net/sonic-sairedis@ecb95a8
[azp] Enable pretty code coverage results xml (#946) sonic-net/sonic-sairedis@1148d16
[gearbox] startup gbsyncd in sync mode in vSonic (#939) sonic-net/sonic-sairedis@e59a085
[unittest] Add more Meta tests (#948) sonic-net/sonic-sairedis@812f7a5
[syncd] Fix SwitchNotifications to be const reference (#945) sonic-net/sonic-sairedis@5863ed3
[syncd] Refactor syncd request shutdown command line parser (#944) sonic-net/sonic-sairedis@d598dea
[unittest] Update meta tests (#943) sonic-net/sonic-sairedis@26b2237
[ci]: Support code diff coverage (#934) sonic-net/sonic-sairedis@e545b17
Sonic sairedis changes for SAI SRV6 and SAI refpoint update to v1.9.0 (#937) sonic-net/sonic-sairedis@921cf0b
[sairedis] Fail get/clear api on objects created in init view mode (#930) sonic-net/sonic-sairedis@362b34e
[vslib]: Remove invalid lane when create ports (#938) sonic-net/sonic-sairedis@db403f4
[Barefoot] enable bulk api`s in SAI (#927) sonic-net/sonic-sairedis@6df04d8
[unittest] Add NotificationBfdSessionStateChange tests (#940) sonic-net/sonic-sairedis@89d639b
[azp] Skip auto generated saimetadata lib code coverage (#935) sonic-net/sonic-sairedis@40e9c74
Remove tail white spaces sonic-net/sonic-sairedis@dabd1a7
Bring back pyext in Makefile.am sonic-net/sonic-sairedis@94d5545
Add RedisChannel tests sonic-net/sonic-sairedis@e16606a
Add RedisVidIndexGenerator tests sonic-net/sonic-sairedis@62b8fdd
Add ServerConfig tests sonic-net/sonic-sairedis@58725df
Add SkipRecordAttrContainer tests sonic-net/sonic-sairedis@6842d92
Update Switch tests sonic-net/sonic-sairedis@cd13f49
Add SwitchConfigContainer tests sonic-net/sonic-sairedis@6fc213d
Add SwitchConfigContainer tests sonic-net/sonic-sairedis@ee24c0e
Add SwitchContainer tests sonic-net/sonic-sairedis@e33c6e9
Add ZeroMQChannel tests sonic-net/sonic-sairedis@bcd1648
Add VirtualObjectIdManager tests sonic-net/sonic-sairedis@0a2cb2c
[sairedis] Remove legacy allocateSwitchIndex api sonic-net/sonic-sairedis@16fff7f

Sonic-swss:

[orchagent] Add separate next hop table and orch (#1702) sonic-net/sonic-swss@f248e26
[portorch]: Skip to create port if the lane set isn't available in ASIC (#1923) sonic-net/sonic-swss@fd0cafe
fix the type for SAI_BUFFER_PROFILE_ATTR_BUFFER_SIZE (#1942) sonic-net/sonic-swss@ef6b5d4
[cfgmgr] Fix for STATE_DB Port check (#1936) sonic-net/sonic-swss@b592ad7
Pterosaur added a commit to Pterosaur/sonic-buildimage that referenced this pull request Oct 26, 2021
7444e96 [macsecmgr]: Add rekey period in macsec mgr (sonic-net#1958)
d95823d [Buffermgr]Graceful handling of buffer model change (sonic-net#1956)
b0aa6a0 EVPN VxLAN enhancement to support P2MP tunnel based programming for Layer2 extension (sonic-net#1858)
85bdf54 Fix the option missing in kernel config issue (sonic-net#1973)
6b15584 (master) Orchagent validates mirror session queue parameter against maximum value from SAI (sonic-net#1957)
fc9ffb9 [copp] Add ISIS, LDP and micro-BFD trap types to CoPP manager (sonic-net#1890)
452cbc1 [macsecorch]: Add IPG adjusting for MACsec gearbox model (sonic-net#1925)
f248e26 [orchagent] Add separate next hop table and orch (sonic-net#1702)
fd0cafe [portorch]: Skip to create port if the lane set isn't available in ASIC (sonic-net#1923)
ef6b5d4 fix the type for SAI_BUFFER_PROFILE_ATTR_BUFFER_SIZE (sonic-net#1942)
b592ad7 [cfgmgr] Fix for STATE_DB Port check (sonic-net#1936)

Signed-off-by: Ze Gan <ganze718@gmail.com>
vivekrnv added a commit to vivekrnv/sonic-buildimage that referenced this pull request Nov 23, 2021
a0bff26 [acl-loader] modify acl-loader with change in STATE DB ACL capability table (sonic-net#1896)
a395e28 [debug dump util] Changes for EVPN and VxLAN dump module (sonic-net#1892)
02a98ef [debug dump util] Route Module added (sonic-net#1913)
ac8382f [generic-config-updater] Logging change just before applying it (sonic-net#1934)
9ab6c51 [flex counter] Flex counter threads consume too much CPU resources. sonic-net#9202 (sonic-net#1925)
2ec47a5 [generic-config-updater] Handling empty tables while sorting a patch (sonic-net#1923)
fdedcbf [fdbshow]: Handle FDB cleanup gracefully. (sonic-net#1926)
e7535ae [sonic-cli-gen] first phase implementation of the SONiC CLI Auto-generation tool (sonic-net#1644)

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
lguohan pushed a commit that referenced this pull request Nov 24, 2021
a0bff26 [acl-loader] modify acl-loader with change in STATE DB ACL capability table (#1896)
a395e28 [debug dump util] Changes for EVPN and VxLAN dump module (#1892)
02a98ef [debug dump util] Route Module added (#1913)
ac8382f [generic-config-updater] Logging change just before applying it (#1934)
9ab6c51 [flex counter] Flex counter threads consume too much CPU resources. #9202 (#1925)
2ec47a5 [generic-config-updater] Handling empty tables while sorting a patch (#1923)
fdedcbf [fdbshow]: Handle FDB cleanup gracefully. (#1926)
e7535ae [sonic-cli-gen] first phase implementation of the SONiC CLI Auto-generation tool (#1644)

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
…IC (sonic-net#1923)

* Skip create port if the lane set isn't available in ASIC

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Fix port breakout

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Revert "Fix port breakout"

This reverts commit b6c62b9a9cf4c4b4ccc5ab82ddb9732c899f8dea.

* Revert "Skip create port if the lane set isn't available in ASIC"

This reverts commit f521da377ba8dbc888fdc9cb7156450079339824.

* Skip if add port failure

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Fix bug

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Skip if init port failure

Signed-off-by: Ze Gan <ganze718@gmail.com>
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this pull request Apr 28, 2022
…onic-net#1923)

#### What I did
Fixing issue sonic-net#1908 

#### How I did it
- When the given patch produces empty-table, reject it since ConfigDb cannot show empty tables. Achieved that by:
  - Adding a validation step before patch-sorting
- The patch-sorter should not produce steps which result in empty-tables because it is not possible in ConfigDb, we should instead delete the whole table. Achieved that by:
  - Adding a new validator to reject moves producing empty tables
  - No need to add a generator for deleting the whole table, current generators take care of that. They do by the following:
    - The move to empty a table is rejected by `NoEmptyTableMoveValidator`
    - The previous rejected move is used to generate moves using `UpperLevelMoveExtender` which produces either
      - Remove move for parent -- This is good, we are removing the table
      - Replace move for parent -- This later on will be extended to a Delete move using `DeleteInsteadOfReplaceMoveExtender`

The generators/validators are documented in the `PatchSorter.py`, check the documentation out.

#### How to verify it
unit-test

#### Previous command output (if the output of a command-line utility has changed)
```sh
admin@vlab-01:~$ sudo config apply-patch empty-a-table.json-patch -v
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "replace", "path": "/DEVICE_METADATA", "value": {}}]
Patch Applier: Validating patch is not making changes to tables without YANG models.
Patch Applier: Getting current config db.
Patch Applier: Simulating the target full config after applying the patch.
Patch Applier: Validating target config according to YANG models.
... sonig-yang-mgmt logs
Patch Applier: Sorting patch updates.
... sonig-yang-mgmt logs
Patch Applier: The patch was sorted into 11 changes:
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/bgp_asn"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/buffer_model"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/default_bgp_status"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/default_pfcwd_status"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/deployment_id"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/docker_routing_config_mode"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/hostname"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/hwsku"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/mac"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost/platform"}]
Patch Applier:   * [{"op": "remove", "path": "/DEVICE_METADATA/localhost"}]
Patch Applier: Applying changes in order.
Patch Applier: Verifying patch updates are reflected on ConfigDB.
Failed to apply patch
Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH
Try "config apply-patch -h" for help.

Error: After applying patch to config, there are still some parts not updated
admin@vlab-01:~$ 
```

The above error occurs because post the update, the whole `DEVICE_METADATA` table is deleted, not just showing as empty i.e. `"DEVICE_METADATA": {}`

#### New command output (if the output of a command-line utility has changed)
```
admin@vlab-01:~$ sudo config apply-patch empty-a-table.json-patch -v
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "replace", "path": "/DEVICE_METADATA", "value": {}}]
Patch Applier: Validating patch is not making changes to tables without YANG models.
Patch Applier: Getting current config db.
Patch Applier: Simulating the target full config after applying the patch.
Patch Applier: Validating target config does not have empty tables, since they do not show up in ConfigDb.
Failed to apply patch
Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH
Try "config apply-patch -h" for help.

Error: Given patch is not valid because it will result in empty tables which is not allowed in ConfigDb. Table: DEVICE_METADATA
admin@vlab-01:~$ 
```
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.

3 participants