amorenoz / ovsdb-mon Goto Github PK
View Code? Open in Web Editor NEWAn OVSDB database visualization tool based on auto-generated schema bindings
License: Apache License 2.0
An OVSDB database visualization tool based on auto-generated schema bindings
License: Apache License 2.0
It seems to detect as a diff something that is not, e.g:
New update event on table Logical_Switch_Port
{
UUID: "35abef59-644f-41a7-90c7-72f96d490961",
Addresses: [
+ "0a:58:0a:f4:00:0c 10.244.0.12",
],
Dhcpv4Options: [
],
Dhcpv6Options: [
],
DynamicAddresses: [
],
Enabled: [
],
ExternalIDs: {
+ namespace: "default",
+ pod: "true",
},
HaChassisGroup: [
],
- Name: "",
+ Name: "default_echo-deployment-869b7bf9c7-7p6q6",
Options: {
+ requested-chassis: "ovn-worker2",
},
ParentName: [
],
PortSecurity: [
+ "0a:58:0a:f4:00:0c 10.244.0.12",
],
Tag: [
],
TagRequest: [
],
Type: "",
Up: [
+ false,
],
}
New update event on table Logical_Switch_Port
{
UUID: "35abef59-644f-41a7-90c7-72f96d490961",
Addresses: [
+ "0a:58:0a:f4:00:0c 10.244.0.12",
],
Dhcpv4Options: [
],
Dhcpv6Options: [
],
DynamicAddresses: [
],
Enabled: [
],
ExternalIDs: {
+ namespace: "default",
+ pod: "true",
},
HaChassisGroup: [
],
- Name: "",
+ Name: "default_echo-deployment-869b7bf9c7-7p6q6",
Options: {
+ requested-chassis: "ovn-worker2",
},
ParentName: [
],
PortSecurity: [
+ "0a:58:0a:f4:00:0c 10.244.0.12",
],
Tag: [
],
TagRequest: [
],
Type: "",
Up: [
- false,
+ true,
],
}
A common usage case for this tool is to monitor changes in the OVSDB db.
Pending the upcoming changes in libovsdb for conditional monitoring (ovn-org/libovsdb#222),
it will become easier to allow user to specify the table(s) she/he cares about. We should expose that functionality to
this awesome tool.
Hi,
I am getting the following error when I run ovsdb-mon. Are there any additional logs I can provide?
gmckee@usc01a-lab-ovn04:~/Projects/ovsdb-mon/bin$ sudo ./ovsdb-mon -db unix:/var/run/ovn/ovnnb_db.sock
2022/12/07 21:37:43 libovsdb: trying to connect to DB unix:/var/run/ovn/ovnnb_db.sock
2022/12/07 21:37:43 libovsdb: connected to unix:/var/run/ovn/ovnnb_db.sock
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x68338c]
goroutine 1 [running]:
main.(*OvsdbShell).exactFieldName(0xc00022bd70?, {0xc0000e2330?, 0xc000147870?}, {0xc000147a4c, 0x4})
/home/gmckee/Projects/ovsdb-mon/cmd/ovsdb-mon/shell.go:381 +0x6c
main.(*OvsdbShell).Run(0xc000133260, {0x78ba40?, 0xc000133340?}, {0xc00009c170, 0x0, 0x0})
/home/gmckee/Projects/ovsdb-mon/cmd/ovsdb-mon/shell.go:142 +0x1025
main.main()
/home/gmckee/Projects/ovsdb-mon/cmd/ovsdb-mon/ovsdb-mon.go:68 +0x37c
gmckee@usc01a-lab-ovn04:~/Projects/ovsdb-mon/bin$ systemctl status ovn-ovsdb-server-nb.service
● ovn-ovsdb-server-nb.service - Open vSwitch database server for OVN Northbound database
Loaded: loaded (/lib/systemd/system/ovn-ovsdb-server-nb.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-11-24 00:03:08 UTC; 1 week 6 days ago
Main PID: 3139 (ovsdb-server)
Tasks: 1 (limit: 9289)
Memory: 2.4M
CPU: 1h 12min 57.382s
CGroup: /system.slice/ovn-ovsdb-server-nb.service
└─3139 ovsdb-server -vconsole:off -vfile:info --log-file=/var/log/ovn/ovsdb-server-nb.log --remote=punix:/var/run/ovn/ovnnb_db.sock --p>
Dec 06 00:00:12 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00193|vlog|INFO|closing log file
Dec 06 00:00:12 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00194|vlog|INFO|opened log file /var/log/ovn/ovsdb-server-nb.log
Dec 06 01:39:55 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00195|jsonrpc|WARN|unix#803: send error: Broken pipe
Dec 06 01:39:55 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00196|reconnect|WARN|unix#803: connection dropped (Broken pipe)
Dec 06 01:42:55 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00197|jsonrpc|WARN|unix#806: send error: Broken pipe
Dec 06 01:42:55 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00198|reconnect|WARN|unix#806: connection dropped (Broken pipe)
Dec 07 00:00:13 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00199|vlog|INFO|closing log file
Dec 07 00:00:13 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00200|vlog|INFO|opened log file /var/log/ovn/ovsdb-server-nb.log
Dec 07 18:03:29 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00201|jsonrpc|WARN|tcp:172.16.49.9:40520: error parsing stream: line 1, column 0, byte 2: i>
Dec 07 18:03:29 usc01a-lab-ovn04 ovsdb-server[3139]: ovs|00202|reconnect|WARN|tcp:172.16.49.9:40520: connection dropped (Protocol error)
OVN Version 22.03.0
$ ovn-nbctl --version
ovn-nbctl 22.03.0
Open vSwitch Library 2.17.0
DB Schema 6.1.0
This could be useful in a large environment, rather then listing every port in a large environment then filtering the results we could like filter the results before returning the results.
For example:
>>> list Logical_Switch_Port --filter UUID=d85f590a-0e60-4c6e-a393-a564d0a10d8e UUID Name Up Enabled ExternalIDs
+--------------------------------------+----------------------------------------------+-------+---------+-------------------------------------------------------------------+
| UUID | NAME | UP | ENABLED | EXTERNALIDS |
+--------------------------------------+----------------------------------------------+-------+---------+-------------------------------------------------------------------+
| d85f590a-0e60-4c6e-a393-a564d0a10d8e | 4258bc9a-89d4-4e53-8213-340309de7787 | false | true | map[neutron:cidrs:172.21.11.132/24 |
| | | | | neutron:device_id:78db7605-c5a8-4122-97a2-85ba7ca4df6b |
| | | | | neutron:device_owner:compute:nova |
| | | | | neutron:network_name:neutron-88ab458a-4a46-4bb8-b12f-f3c1f8b8bd2c |
| | | | | neutron:port_name: |
| | | | | neutron:project_id:23d9837907e347d58920de8b76162390 |
| | | | | neutron:revision_number:7 |
| | | | | neutron:security_group_ids:c09d7d8e-2844-4ea3-b5e8-39ce231061d1] |
+--------------------------------------+----------------------------------------------+-------+---------+-------------------------------------------------------------------+
With latest release of Openshift, additional changes will be needed to yaml files, so pod are permitted to use host networking.
source ./ovsdb-mon-ovn.source
Error from server (Forbidden): error when creating "./ovsdb-mon-ovn.yaml": pods "ovsdb-mon-ovn" is forbidden: violates PodSecurity "restricted:latest": host namespaces (hostNetwork=true), allowPrivilegeEscalation != false (container "ovsdb-mon-ovn" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "ovsdb-mon-ovn" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "run-ovn", "run-ovs" use restricted volume type "hostPath"), runAsNonRoot != true (pod or container "ovsdb-mon-ovn" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "ovsdb-mon-ovn" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
bad k8s?
Hello,
i'm trying to do make with default schema without success
Generating model based on schema schemas/ovn-nb.ovsschema
model/model.go:14:33: undefined: model.ClientDBModel
model/model.go:15:15: undefined: model.NewClientDBModel
make: *** [Makefile:22: build] Error 1
go version go1.20.3 linux/amd64
Can you give me some help,
Regard,
Nicolas
This project should also work with OvS or OVN SB, or any other OVNDB. How about we rename the project and binary to reflect that?
Hi Team,
Using the tab complete function is fanatic but it's a small annoyance to have to use the correct case.
If it is an easy change I think it would be worth it.
Example:
list logical_Flow <tab> <tab> Won't work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.