Skip to content

Instantly share code, notes, and snippets.

View cholcombe973's full-sized avatar

Chris Holcombe cholcombe973

  • @tesla.com
  • Portland
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cholcombe973 on github.
  • I am cholcombe973 (https://keybase.io/cholcombe973) on keybase.
  • I have a public key ASCCs4TBYV8FRiKZv5T0eyktJy1XzTYYGd0aiViAS2M1ZAo

To claim this, I am signing this object:

NAME=\"(?P<name>[a-zA-Z0-9]+)\"\s+MAJ:MIN=\"(?P<major>[0-9]+):(?P<minor>[0-9]+)\"\s+RM=\"(?P<removable>[0-1])\"\s+SIZE=\"(?P<size>[0-9.BKMGP]+)\"\s+RO=\"(?P<read_only>[0-1])\"\s+TYPE=\"(?P<disk>[a-zA-Z]+)\"\s+MOUNTPOINT=\"(?P<mountpoint>[a-zA-Z0-9./]*)\"
= note: expected type `tokio_process::OutputAsync`
found type `futures::AndThen<tokio_process::OutputAsync, std::result::Result<(), std::io::Error>, [closure@src/main.rs:457:34: 457:93 device_path:_, mount_path:_]>`
error[E0382]: use of moved value: `zpool_create`
--> src/block.rs:288:31
|
263 | zpool_create.and_then(|_| {
| ------------ value moved here
...
288 | return Ok(zpool_create);
| ^^^^^^^^^^^^ value used here after move
|
= note: move occurs because `zpool_create` has type `tokio_process::OutputAsync`, which does not implement the `Copy` trait
root@ip-172-31-0-212:~# nc -U /var/run/ceph/ceph-osd.1.asok
{"var":"fsid","prefix":"config get"}\0
7{
"fsid": "d8d3092e-0826-11e7-84db-0671f85b71bb"
}
{
"name": "mon.ip-172-31-20-205",
"cluster": "ceph",
"debug_none": "0\/5",
"debug_lockdep": "0\/1",
"debug_context": "0\/1",
"debug_crush": "1\/1",
"debug_mds": "1\/5",
"debug_mds_balancer": "1\/5",
"debug_mds_locker": "1\/5",
Mar 01 19:46:23 xenial-maas sh[10719]: d = defer.maybeDeferred(self.f, *self.a, **self.kw)
Mar 01 19:46:23 xenial-maas sh[10719]: --- <exception caught here> ---
Mar 01 19:46:23 xenial-maas sh[10719]: File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 150, in maybeDeferred
Mar 01 19:46:23 xenial-maas sh[10719]: result = f(*args, **kw)
Mar 01 19:46:23 xenial-maas sh[10719]: File "/usr/lib/python3/dist-packages/provisioningserver/rackdservices/tftp.py", line 419, in updateServers
Mar 01 19:46:23 xenial-maas sh[10719]: tftp_service.setServiceParent(self)
Mar 01 19:46:23 xenial-maas sh[10719]: File "/usr/lib/python3/dist-packages/twisted/application/service.py", line 188, in setServiceParent
Mar 01 19:46:23 xenial-maas sh[10719]: self.parent.addService(self)
Mar 01 19:46:23 xenial-maas sh[10719]: File "/usr/lib/python3/dist-packages/twisted/application/service.py", line 309, in addService
Mar 01 19:4
@cholcombe973
cholcombe973 / playground.rs
Last active February 14, 2017 04:11 — forked from anonymous/playground.rs
Shared via Rust Playground
fn main() {
let a = ["1", "2", "lol"];
let mut iter = a.iter().filter_map(|s| s.parse().ok()).count();
}
{
"gluster.brick._mnt_xvdf.inter.read_1b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.write_1b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.read_2b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.write_2b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.read_4b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.write_4b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.read_8b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.write_8b_per_sec": "0.00",
"gluster.brick._mnt_xvdf.inter.read_16b_per_sec": "0.00",
from _ctypes import POINTER, byref
import ctypes
import os
def get_block_uuid(block_dev):
"""
This queries blkid to get the uuid for a block device.
:param block_dev: Name of the block device to query.
:return: The UUID of the device or None on Error.
"""