Skip to content

Instantly share code, notes, and snippets.

@nmathew
nmathew / BasicTest.java
Created March 28, 2012 12:56
Aggreator Issue
import java.util.List;
import models.Comment;
import models.Post;
import models.User;
import org.junit.Before;
import org.junit.Test;
import play.modules.siena.SienaFixtures;
@nmathew
nmathew / git.txt
Created April 11, 2018 13:16
git log
nobmat@LMS MINGW64 ~/atomix (master)
$ git log
commit 994b4d3f642701fc4d3aa28a440daca9e24c1800
Author: Jordan Halterman <[email protected]>
Date: Thu Mar 22 15:49:07 2018 -0700
Add CONSENSUS node type and separate primary-backup partitions from consensus nodes.
commit f9e41bd020a8bfb185a47b3b281dcf203b483513
Author: Jordan Halterman <[email protected]>
@nmathew
nmathew / HTTPProxy.go
Last active September 25, 2020 16:14
import projectcontour "github.com/projectcontour/contour/apis/projectcontour/v1"
func getHTTPProxyRule(host string) projectcontour.HTTPProxy {
KubeApiIngressRule := projectcontour.HTTPProxy{
TypeMeta: metav1.TypeMeta{
Kind: "HTTPProxy",
APIVersion: "projectcontour.io/v1",
},
ObjectMeta: metav1.ObjectMeta{
@nmathew
nmathew / nmstate
Created November 16, 2021 05:07
nmstate debug logs
sles@sles-master:~> sudo nmstatectl show
2021-11-16 05:06:18,990 root DEBUG NetworkManager version 1.32.12
2021-11-16 05:06:18,992 root DEBUG Async action: Retrieve applied config: ethernet eth0 started
2021-11-16 05:06:18,992 root DEBUG Async action: Retrieve applied config: ethernet eth1 started
2021-11-16 05:06:18,994 root DEBUG Async action: Retrieve applied config: ethernet eth0 finished
2021-11-16 05:06:18,995 root DEBUG Async action: Retrieve applied config: ethernet eth1 finished
2021-11-16 05:06:18,997 root DEBUG Interface ethernet.eth1 found. Merging the interface information.
---
dns-resolver:
config: {}
@nmathew
nmathew / gist:a35215ff5a87a489d462b539d713f94f
Created November 16, 2021 05:11
sudo nmstatectl apply nmstate.yaml
sles@sles-master:~> sudo nmstatectl apply nmstate.yaml
2021-11-16 05:06:13,878 root DEBUG Nmstate version: 1.1.0
2021-11-16 05:06:13,879 root DEBUG Applying desire state: {'interfaces': [{'name': 'eth1', 'state': 'up', 'type': 'ethernet', 'ipv4': {'enabled': True, 'dhcp': False, 'address': [{'ip': '10.100.11.133', 'prefix-length': 24}]}}]}
2021-11-16 05:06:14,080 root DEBUG NetworkManager version 1.32.12
2021-11-16 05:06:14,086 root DEBUG Async action: Retrieve applied config: ethernet eth0 started
2021-11-16 05:06:14,086 root DEBUG Async action: Retrieve applied config: ethernet eth1 started
2021-11-16 05:06:14,088 root DEBUG Async action: Retrieve applied config: ethernet eth0 finished
2021-11-16 05:06:14,089 root DEBUG Async action: Retrieve applied config: ethernet eth1 finished
2021-11-16 05:06:14,092 root DEBUG Interface ethernet.eth1 found. Merging the interface information.
2021-11-16 05:06:14,104 root DEBU
@nmathew
nmathew / gist:cdda76fe3a3f1717f1a602d7eae7f8c5
Created November 16, 2021 05:19
github issue nmstate logs
Created symlink /etc/systemd/system/network.service → /usr/lib/systemd/system/NetworkManager.service.
Created symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service → /usr/lib/systemd/system/NetworkManager.service.
Created symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service → /usr/lib/systemd/system/NetworkManager-dispatcher.service.
Created symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service → /usr/lib/systemd/system/NetworkManager-wait-online.service.
Created symlink /etc/systemd/system/multi-user.target.wants/openvswitch.service → /usr/lib/systemd/system/openvswitch.service.
/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py:335: UserWarning: Using 'set' is deprecated, use 'apply' instead.
warnings.warn("Using 'set' is deprecated, use 'apply' instead.")
2021-11-15 04:46:26,487 root DEBUG Nmstate version: 1.1.0
2021-11-15 04:46:26,488 root DEBUG Applying desire state: {'interfaces': [{'name': 'enp94s
@nmathew
nmathew / gist:6c2f467eeb7fdfd57cd42cecd3cf45b1
Created November 16, 2021 09:27
NM desired state YAML
routes:
config:
- destination: 0.0.0.0/0
next-hop-address:
gateway-from-net:
value: 10.221.150.65
table-id: 254
next-hop-interface: bm25b_infra_ext
interfaces:
- name: enp94s0f0
nmstatect apply <config>
pool1-bm25-7:/node-files # nmstatectl apply test-nmstate-netcfg
2021-12-22 03:57:34,822 root DEBUG Nmstate version: 1.1.0
2021-12-22 03:57:34,823 root DEBUG Applying desire state: {'interfaces': [{'name': 'enp94s0f1', 'state': 'up', 'type': 'ethernet', 'mtu': 1500, 'ethtool': {'ring': {'rx': 2048, 'rx-jumbo': 4096, 'rx-mini': 4096, 'tx': 512}}}]}
2021-12-22 03:57:35,292 root DEBUG NetworkManager version 1.32.12
2021-12-22 03:57:35,300 root DEBUG Async action: Retrieve applied config: bridge docker0 started
2021-12-22 03:57:35,301 root DEBUG Async action: Retrieve applied config: ethernet enp216s0f1 started
2021-12-22 03:57:35,301 root DEBUG Async action: Retrieve applied config: ethernet enp94s0f0 started
2021-12-22 03:57:35,301 root DEBUG Async action: Retrieve applied config: ethernet enp94s0f1 started
This file has been truncated, but you can view the full file.
[enobmat@jumphost ~]$ cat NetworkManager
2021-12-22T03:20:15.440435+00:00 localhost NetworkManager[3472]: <info> [1640143215.4402] NetworkManager (version 1.32.12) is starting... (for the first time)
2021-12-22T03:20:15.440871+00:00 localhost NetworkManager[3472]: <info> [1640143215.4403] Read config: /etc/NetworkManager/NetworkManager.conf (etc: 50-ccd.conf, 99-cloud-init.conf)
2021-12-22T03:20:15.444359+00:00 localhost NetworkManager[3472]: <info> [1640143215.4441] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
2021-12-22T03:20:15.455050+00:00 localhost NetworkManager[3472]: <info> [1640143215.4548] manager[0x27430a0]: monitoring kernel firmware directory '/lib/firmware'.
2021-12-22T03:20:15.480880+00:00 localhost NetworkManager[3472]: <info> [1640143215.4807] hostname: hostname: using hostnamed
2021-12-22T03:20:15.481361+00:00 localhost NetworkManager[3472]: <info> [1640143215.4808] hostname: hostname changed from (none) to "pool1-bm25-7"
2021-12-22T03:20:15.481913+00:00 localho
@nmathew
nmathew / ovs_issue.txt
Last active June 28, 2022 14:28
Nmstate ovs issue
boot configuration:
interfaces:
- name: bond0
state: up
type: bond
ipv4:
enabled: false
dhcp: false
link-aggregation:
mode: 802.3ad