Skip to content

Instantly share code, notes, and snippets.

View danmcd's full-sized avatar

Dan McDonald danmcd

View GitHub Profile
@danmcd
danmcd / overlay-new-request-target.diff
Created March 13, 2018 19:21
What I imagine the first step to make overlay deal with routed destinations. Thanks JBK for the overlay_targ_lookup_t changes.
diff --git a/usr/src/uts/common/sys/overlay_target.h b/usr/src/uts/common/sys/overlay_target.h
index cae193c..d09c776 100644
--- a/usr/src/uts/common/sys/overlay_target.h
+++ b/usr/src/uts/common/sys/overlay_target.h
@@ -29,10 +29,21 @@
extern "C" {
#endif
+/*
+ * The answer we want at the end of the day. What are the target and source
subnets:
- type: dhcp
- type: static
address: 10.184.225.122
netmask: 255.255.255.252
routes:
- gateway: 10.184.225.121
netmask: 255.240.0.0
network: 10.176.0.0
- gateway: 10.184.225.122 <<<ALLOWED?
ubuntu@bffbbda9-5fbb-4492-ca38-918203ff5820:~$ cloud-init collect-logs
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 11, in <module>
load_entry_point('cloud-init==17.2', 'console_scripts', 'cloud-init')()
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 859, in main
get_uptime=True, func=functor, args=(name, args))
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2296, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/devel/logs.py", line 88, in handle_collect_logs_args
collect_logs(args.tarfile, args.userdata)
diff --git a/overlay/generic/usr/lib/brand/jcommon/statechange b/overlay/generic/usr/lib/brand/jcommon/statechange
index 4f61a02..0d08300 100644
--- a/overlay/generic/usr/lib/brand/jcommon/statechange
+++ b/overlay/generic/usr/lib/brand/jcommon/statechange
@@ -264,9 +264,34 @@ setup_net()
# it already exist?
#
if [[ -n "$isoverlay" ]]; then
- if ! dladm show-overlay $global_nic 2>/dev/null; then
- dladm create-overlay $rule -v $num $global_nic
# /bin/time pkg update -r --be-name r151027-europe ; pkg set-publisher -m http://165.225.128.135/bloody/core omnios ; pkg -R /zones/tz2/root set-publisher -m http://165.225.128.135/bloody/core omnios ; /bin/time pkg update -r --be-name r151027-us-east
Packages to update: 439
Packages to change: 1
Mediators to change: 1
Create boot environment: Yes
Create backup boot environment: No
Planning linked: 0/1 done; 1 working: zone:tz2
Linked image 'zone:tz2' output:
| Packages to update: 400
diff --git a/make/dmake.patch b/make/dmake.patch
index c66ee7c..13e9479 100644
--- a/make/dmake.patch
+++ b/make/dmake.patch
@@ -309,6 +309,30 @@ index fc4306b..1211caf 100644
#if defined(DISTRIBUTED)
# include <dm/Avo_CmdOutput.h>
# include <rw/xdrstrea.h>
+@@ -401,8 +403,9 @@
+ }
everywhere(~)[0]% df -h .
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s1 234Gi 147Gi 83Gi 65% 1472739 9223372036853303068 0% /
everywhere(~)[0]% bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
obase=16
9223372036853303068
[root@headnode ~]# dumpadm -y -d /dev/zvol/dsk/zones/dump
Assertion failed: nvlist_lookup_uint64(config, "guid", &vdev_guid) == 0, file ..
NOTICE: alloc: /: file system full
Abort
[root@headnode ~]# dd if=/dev/zero of=/dev/zvol/dsk/zones/dump bs=1k count=256
256+0 records in
256+0 records out
262144 bytes transferred in 0.113012 secs (2319604 bytes/sec)
[root@headnode ~]# dumpadm -y -d /dev/zvol/dsk/zones/dump
dumpadm: cannot use /dev/zvol/dsk/zones/dump as dump device: I/O error
smartos-build(projects/illumos)[0]% /opt/onbld/bin/bldenv illumos.sh
Build type is non-DEBUG
RELEASE is
VERSION is joyent_20180906T012657Z
RELEASE_DATE is September 2018
The top-level 'setup' target is available to build headers and tools.
Using /opt/local/bin/tcsh as shell.
WS-smartos-build-WS(projects/illumos)[0]% cd usr/src/cmd/cdrw
@danmcd
danmcd / YES.txt
Created September 15, 2018 20:36
[root@00-0c-29-77-9d-fe ~]# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1001000943<UP,BROADCAST,RUNNING,PROMISC,MULTICAST,IPv4,FIXEDMTU> mtu 1500 index 2
inet 172.24.4.3 netmask ffffff00 broadcast 172.24.4.255
ether 0:c:29:77:9d:fe
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
[root@00-0c-29-77-9d-fe ~]# ifconfig e1000g0 addif 192.168.1.5/24 up
Created new logical interface e1000g0:1