[root@headnode (emy-7a) ~]# sdc-napi /networks?nic_tag=sdc_overlay | json -Ha provision_start_ip vnet_id
192.168.128.5 14544491
10.21.12.5 14855325
192.168.128.5 14855325
[root@1c52a1cf-bbfe-4dd4-b653-a0c2ecc8b8a2 (emy-7a:moray0) ~]# listbuckets | grep portolan
"name": "portolan_vnet_mac_ip",
"name": "portolan_underlay_mappings",
"name": "portolan_cn_net_events",
| #!/usr/bin/node | |
| var ip6addr = require('ip6addr'); | |
| addr = process.argv[2]; | |
| if (addr.indexOf('/') !== -1) { | |
| var cidr = ip6addr.createCIDR(addr) | |
| console.log(cidr.toString({format: 'v4'})); |
This error is somewhat ambiguious because there is seemingly no indication which resource is exhausted.
Triton chooses compute nodes with a subcomponent called sdc-designation (also refered to as , DAPI). The full DAPI log for a provision job is embedded in the CNAPI log file and can be extracted with the workflow job uuid and the following script.
#!/bin/bash
All config data loader shell functions are implemented in smartos-live:overlay/generic/lib/sdc/config.sh
- Sources (one of the following):
- /mnt/usbkey/config
- /opt/smartdc/config/node.config
- /var/tmp/node.config/node.config
- /usbkey/config
- Loader: load_sdc_config()
- ([rui] this seems to do nothing on a CN boot as it never finds one of the files above)
| #!/usr/bin/bash | |
| function usage() { | |
| echo "Usage: sdc-oneachcorevm.sh \"<command>\"" | |
| exit 1; | |
| } | |
| [[ $# -eq 1 ]] || usage | |
| CMD=${@:1} # or is it ${*:1} ? |
| #!/bin/bash -x | |
| # Default to continue | |
| while true; do | |
| read -p "Do you want to continue? [Y/n] " cont | |
| if [[ $cont != "y" && $cont != "Y" && $cont != "" ]]; then | |
| break; | |
| fi | |
| done; |
In the following diagram we want to route traffic from rui11 (10.222.222.100/24) to dhcp0 (10.99.99.3/24) via the ruirouter0 router.
+-----------------------+ +--------------------------+ +-----------------------+
| dhcp0 | | ruirouter0 | | rui11 |
+-----------------------+ +--------------------------+ +-----------------------+
| | | | | |
| 10.99.99.3/24 <-------------+ 10.99.99.101/24 | +-----+ 10.222.222.100/24 |
| /* | |
| * An example of how to convert an IPv4 address from a dotted decimal string to | |
| * a Big Endian binary representation. | |
| */ | |
| var assert = require('assert'); | |
| ip = '10.99.99.3' |
Create a ~/.mantarc like so:
export MANTA_URL=https://us-east.manta.joyent.com
export MANTA_USER=rui.loura
unset MANTA_SUBUSER # Unless you have subusers
export MANTA_KEY_ID=$(ssh-keygen -l -f $HOME/.ssh/id_ecdsa.pub | awk '{print $2}')
Then drop the following into your ~/.bashrc or ~/.bash_profile
My chromebook doesn't have a caps lock key, it has a "search" key. When running crouton xfce4 is unaware of this key in the keybaord mappings GUI. This is how I ended up mapping the search/capslock key to escape.
- Run xev(1)
- Strike the capslock (aka search, or super_L key) and ook for entries like the following:
KeyPress event, serial 28, synthetic NO, window 0x2600001,
root 0xd3, subw 0x0, time 16308538, (449,411), root:(1043,703),
state 0x0, keycode 133 (keysym 0xff1b, Escape), same_screen YES,
XKeysymToKeycode returns keycode: 9
XLookupString gives 1 bytes: (1b)