Skip to content

Instantly share code, notes, and snippets.

View major's full-sized avatar
🤠
Yeehaw.

Major Hayden major

🤠
Yeehaw.
View GitHub Profile
[root@galera-server-test ~]# for i in `seq 1 3`; do echo $i; ssh container${i} 'rpm -qa | grep -i maria | sort'; done
1
MariaDB-client-10.1.24-1.el7.centos.x86_64
MariaDB-common-10.0.31-1.el7.centos.x86_64
MariaDB-devel-10.1.24-1.el7.centos.x86_64
MariaDB-server-10.1.24-1.el7.centos.x86_64
MariaDB-shared-10.1.24-1.el7.centos.x86_64
2
MariaDB-client-10.0.31-1.el7.centos.x86_64
MariaDB-common-10.0.31-1.el7.centos.x86_64
@major
major / strace.txt
Created June 13, 2017 17:31
Galera startup under LXC 2.0.8 on CentOS 7
31298 statfs("/dev", {f_type=0x1021994, f_bsize=4096, f_blocks=968407, f_bfree=968407, f_bavail=968407, f_files=968407, f_ffree=968389, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
31298 stat("/dev", {st_mode=S_IFDIR|0755, st_size=380, ...}) = 0
31298 mount(NULL, "/dev", NULL, MS_NOSUID|MS_REMOUNT|MS_BIND, NULL) = 0
31298 statfs("/dev/lxc/tty3", 0x7fff0139c200) = -1 ENOENT (No such file or directory)
31298 mount(NULL, "/dev/lxc/tty3", NULL, MS_REMOUNT|MS_BIND, NULL) = -1 ENOENT (No such file or directory)
31298 statfs("/dev/lxc/tty2", 0x7fff0139c200) = -1 ENOENT (No such file or directory)
31298 mount(NULL, "/dev/lxc/tty2", NULL, MS_REMOUNT|MS_BIND, NULL) = -1 ENOENT (No such file or directory)
31298 statfs("/dev/log", {f_type=0x1021994, f_bsize=4096, f_blocks=123, f_bfree=123, f_bavail=123, f_files=968407, f_ffree=968375, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
31298 stat("/dev/log", {st_mode=S_IFSOCK|0666, st_size=0, ...}) = 0
31298 mount(NULL, "/dev/log", NULL, MS_REMOUNT|MS_BIND, NULL) = 0
osquery> select * from acpi_tables;
+-------+-------+----------------------------------+
| name | size | md5 |
+-------+-------+----------------------------------+
| APIC | 114 | 01b48f5333fb849fbc8ff05b7f0cc331 |
| BERT | 48 | 7f745649528c18af0c9e1211a2d9a968 |
| DMAR | 120 | 1d028fab9204b1a801e9888e027b3666 |
| DSDT | 45444 | 40a62bd8266fcdc40556cd3a4894c92f |
| EINJ | 304 | f794923af2cdded9b824039ecc92b45f |
| ERST | 528 | 62cf154f7dc1aea4c29759303313d70d |
osquery> select * from interface_addresses;
+----------------+---------------------------+-----------------------------------------+-----------------+----------------+
| interface | address | mask | broadcast | point_to_point |
+----------------+---------------------------+-----------------------------------------+-----------------+----------------+
| lo | 127.0.0.1 | 255.0.0.0 | | 127.0.0.1 |
| enp2s0 | 192.168.250.21 | 255.255.255.0 | 192.168.250.255 | |
| br-vxlan | 172.29.240.21 | 255.255.252.0 | 172.29.243.255 | |
| br-mgmt | 172.29.236.21 | 255.255.252.0 | 172.29.239.255 | |
| lxcbr0 | 10.0.3.1 | 255.255.255.0 | 10.0.3.255 |
osquery> select * from cpu_time;
+------+---------+------+--------+-----------+--------+-----+---------+-------+---------+------------+
| core | user | nice | system | idle | iowait | irq | softirq | steal | guest | guest_nice |
+------+---------+------+--------+-----------+--------+-----+---------+-------+---------+------------+
| 0 | 2392978 | 123 | 441651 | 117990187 | 79097 | 0 | 87518 | 0 | 2045129 | 0 |
| 1 | 3494429 | 98 | 654581 | 116645367 | 96929 | 0 | 45314 | 0 | 2805310 | 0 |
| 2 | 3642373 | 113 | 650170 | 116586472 | 82615 | 0 | 39288 | 0 | 2913799 | 0 |
| 3 | 1380744 | 110 | 436153 | 118253306 | 93201 | 0 | 686208 | 0 | 938277 | 0 |
+------+---------+------+--------+-----------+--------+-----+---------+-------+---------+------------+
osquery> select * from cpu_time;
@major
major / gist:16bb345ace8d2142de9aee1cae3f31e3
Last active May 24, 2017 18:03
osquery testing on OpenStack host
[root@hydrogen ~]# osqueryi
Using a virtual database. Need help, type '.help'
osquery> SELECT uid, name FROM listening_ports l, processes p WHERE l.pid=p.pid ORDER BY uid;
+-----+-----------------+
| uid | name |
+-----+-----------------+
| 0 | sshd |
| 0 | master |
| 0 | sshd |
| 0 | master |
@major
major / dmesg
Created May 19, 2017 14:31
openstack-ansible-os_nova failure on CentOS 7
May 19 14:30:57 os-nova-test kernel: ------------[ cut here ]------------
May 19 14:30:57 os-nova-test kernel: WARNING: at net/core/dev.c:2402 skb_warn_bad_offload+0xcd/0xda()
May 19 14:30:57 os-nova-test kernel: vif: caps=(0x0000000100054803, 0x00001001001f480b) len=1426 data_len=1374 gso_size=1343 gso_type=1 ip_summed=3
May 19 14:30:57 os-nova-test kernel: Modules linked in: nf_conntrack_netlink xt_REDIRECT nf_nat_redirect xt_nat xt_mark xt_connmark vxlan ip6_udp_tunnel udp_tunnel xt_comment nfsd auth_rpcgss nfs_acl lockd grace sunrpc veth btrfs zlib_deflate raid6_pq xor loop xt_CHECKSUM vhost_net tun vhost macvtap macvlan iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_vs libcrc32c ipt_MASQUERADE nf_nat_masquerade_ipv4 dm_snapshot dm_bufio dm_multipath br_netfilter 8021q garp mrp ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_
(venv) root@osas-test:~# pip freeze
ansible==2.3.0.0
appdirs==1.4.3
asn1crypto==0.22.0
cffi==1.10.0
cryptography==1.8.1
enum34==1.1.6
idna==2.5
ipaddress==1.0.18
Jinja2==2.9.6
 major   master  …  linux-stable  git lg v4.10.10..v4.10.11
* 4c03110 - (tag: v4.10.11) Linux 4.10.11 (8 days ago) <Greg Kroah-Hartman>
* 2ef9c8d - dma-buf: add support for compat ioctl (8 days ago) <Marek Szyprowski>
* 10e1382 - net/packet: fix overflow in check for priv area size (8 days ago) <Andrey Konovalov>
* 50d6009 - crypto: caam - fix invalid dereference in caam_rsa_init_tfm() (8 days ago) <Horia Geantă>
* 41889ca - crypto: caam - fix RNG deinstantiation error checking (8 days ago) <Horia Geantă>
* 8e94a6f - MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch (8 days ago) <Matt Redfearn>
* 4a1fe14 - MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK (8 days ago) <Matt Redfearn>
* 2c7235d - MIPS: Switch to the irq_stack in interrupts (8 days ago) <Matt Redfearn>
* b21e28e - MIPS: Only change $28 to thread_info if coming from user mode (8 days ago) <Matt Redfearn>
@major
major / rdo-error.txt
Created March 24, 2017 20:15
RDO repo installation error
[root@hydrogen openstack-ansible]# cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core)
[root@hydrogen openstack-ansible]# yum install /tmp/rdo-release-ocata.rpm
Loaded plugins: priorities
Examining /tmp/rdo-release-ocata.rpm: rdo-release-ocata-2.noarch
/tmp/rdo-release-ocata.rpm: does not update installed package.
Error: Nothing to do