Read more about the article pyconau 2018 call for proposals now open
hdr

pyconau 2018 call for proposals now open

The pyconau call for proposals is now open, and runs until 28 May. I took my teenagers to pyconau last year and they greatly enjoyed it. I hadn't been to a pyconau in ages, and ended up really enjoying thinking about things from topic areas I don't normally need to think about. I think expanding one's horizons is generally a good idea. Should I propose something for this year? I am unsure. Some random ideas that immediately spring to mind: something about privsep: I think a generalised way to make privileged calls in unprivileged code is quite interesting, especially in a language which is often used for systems management and integration tasks. That said, perhaps its too OpenStacky given how disinterested in OpenStack talks most python people seem to be. nova-warts: for a long time my hobby has been cleaning up historical mistakes made in OpenStack Nova that wont ever rate as a major feature change. What lessons can other projects learn from a well funded and heavily staffed project that still thought that exec() was a great way to do important work? There's definitely an overlap with the privsep talk above, but this would be more general. a talk…

Continue Readingpyconau 2018 call for proposals now open

Caliban’s War

  • Post author:
  • Post category:Book

This is the second book in the Leviathan Wakes series by James SA Corey. Just as good as the first, this is a story about how much a father loves his daughter, moral choices, and politics -- just as much as it is the continuation of the story arc around the alien visitor. I haven't seen this far in the Netflix series, but I sure hope they get this right, because its a very good story so far.

Continue ReadingCaliban’s War

City2Surf 2018

  • Post author:
  • Post category:Running

I registered for city2surf this morning, which will be the third time I've run in the event. In 2016 my employer sponsored a bunch of us to enter, and I ran the course in 86 minutes and 54 seconds. 2017 was a bit more exciting, because in hindsight I did the final part of my training and the race itself with a torn achilles tendon. Regardless, I finished the course in 79 minutes and 39 seconds -- a 7 minute and 16 second improvement despite the injury. This year I've done a few things differently -- I've started training much earlier, mostly as a side effect to recovering from the achilles injury; and secondly I've decided to try and raise some money for charity during the run. Specifically, I'm raising money for the Black Dog Institute. They were selected because I've struggled with depression on and off over my adult life, and that's especially true for the last twelve months or so. I figure that raising money for a resource that I've found personally useful makes a lot of sense. I'd love for you to donate to the Black Dog Institute, but I understand that's not always possible. Either way,…

Continue ReadingCity2Surf 2018

On Selecting a Well Engaged Open Source Vendor

Aptira is in an interesting position in the Open Source market, because we don’t usually sell software. Instead, our customers come to us seeking assistance with deciding which OpenStack to use, or how to embed ONAP into their nationwide networks, or how to move their legacy networks to the software defined future. Therefore, our most common role is as a trusted advisor to help our customers decide which Open Source products to buy. (My boss would insist that I point out here that we do customisation of Open Source for our customers, and have assisted many in the past with deploying pure upstream solutions. Basically, we do what is the right fit for the customer, and aren’t obsessed with fitting customers into pre-defined moulds that suit our partners.) That makes it important that we recommend products from companies that are well engaged with their upstream Open Source communities. That might be OpenStack, or ONAP, or even something like Open Daylight. This raises the obvious question – what makes a company well engaged with an upstream project? Read more over at my employer's blog...

Continue ReadingOn Selecting a Well Engaged Open Source Vendor

Hugo nominees for 2018

  • Post author:
  • Post category:Book

Lifehacker kindly pointed out that the Hugo nominees are out for 2018. They are: The Collapsing Empire, by John Scalzi. I've read this one and liked it. New York 2140, by Kim Stanley Robinson. I've had a difficult time with Kim's work in the past, but perhaps I'll one day read this. Provenance, by Ann Leckie. I liked Ancillary Justice, but failed to fully read the sequel, so I guess we'll wait and see on this one. Raven Stratagem, by Yoon Ha Lee. I know nothing! Six Wakes, by Mur Lafferty. Again, I know nothing about this book or this author. So a few there to consider in the future.

Continue ReadingHugo nominees for 2018

I think I found a bug in python’s unittest.mock library

  • Post author:
  • Post category:Python

Mocking is a pretty common thing to do in unit tests covering OpenStack Nova code. Over the years we've used various mock libraries to do that, with the flavor de jour being unittest.mock. I must say that I strongly prefer unittest.mock to the old mox code we used to write, but I think I just accidentally found a fairly big bug. The problem is that python mocks are magical. Its an object where you can call any method name, and the mock will happily pretend it has that method, and return None. You can then later ask what "methods" were called on the mock. However, you use the same mock object later to make assertions about what was called. Herein is the problem -- the mock object doesn't know if you're the code under test, or the code that's making assertions. So, if you fat finger the assertion in your test code, the assertion will just quietly map to a non-existent method which returns None, and your code will pass. Here's an example: #!/usr/bin/python3 from unittest import mock class foo(object): def dummy(a, b): return a + b @mock.patch.object(foo, 'dummy') def call_dummy(mock_dummy): f = foo() f.dummy(1, 2) print('Asserting a call should…

Continue ReadingI think I found a bug in python’s unittest.mock library

Configuring docker to use rexray and Ceph for persistent storage

  • Post author:
  • Post category:Docker

For various reasons I wanted to play with docker containers backed by persistent Ceph storage. rexray seemed like the way to do that, so here are my notes on getting that working... First off, I needed to install rexray: root@labosa:~/rexray# curl -sSL https://dl.bintray.com/emccode/rexray/install | sh Selecting previously unselected package rexray. (Reading database ... 177547 files and directories currently installed.) Preparing to unpack rexray_0.9.0-1_amd64.deb ... Unpacking rexray (0.9.0-1) ... Setting up rexray (0.9.0-1) ... rexray has been installed to /usr/bin/rexray REX-Ray ------- Binary: /usr/bin/rexray Flavor: client+agent+controller SemVer: 0.9.0 OsArch: Linux-x86_64 Branch: v0.9.0 Commit: 2a7458dd90a79c673463e14094377baf9fc8695e Formed: Thu, 04 May 2017 07:38:11 AEST libStorage ---------- SemVer: 0.6.0 OsArch: Linux-x86_64 Branch: v0.9.0 Commit: fa055d6da595602715bdfd5541b4aa6d4dcbcbd9 Formed: Thu, 04 May 2017 07:36:11 AEST Which is of course horrid. What that script seems to have done is install a deb'd version of rexray based on an alien'd package: root@labosa:~/rexray# dpkg -s rexray Package: rexray Status: install ok installed Priority: extra Section: alien Installed-Size: 36140 Maintainer: Travis CI User <travis@testing-gce-7fbf00fc-f7cd-4e37-a584-810c64fdeeb1> Architecture: amd64 Version: 0.9.0-1 Depends: libc6 (>= 2.3.2) Description: Tool for managing remote & local storage. A guest based storage introspection tool that allows local visibility and management from cloud and storage platforms. . (Converted from a rpm…

Continue ReadingConfiguring docker to use rexray and Ceph for persistent storage

So you want to setup a Ceph dev environment using OSA

  • Post author:
  • Post category:OpenStack

Support for installing and configuring Ceph was added to openstack-ansible in Ocata, so now that I have a need for a Ceph development environment it seems logical that I would build it by building an openstack-ansible Ocata AIO. There were a few gotchas there, so I want to explain the process I used. First off, Ceph is enabled in an openstack-ansible AIO using a thing I've never seen before called a "Scenario". Basically this means that you need to export an environment variable called "SCENARIO" before running the AIO install. Something like this will do the trick?L: export SCENARIO=ceph Next you need to set the global pg_num in the ceph role or the install will fail. I did that with this patch: --- /etc/ansible/roles/ceph.ceph-common/defaults/main.yml 2017-05-26 08:55:07.803635173 +1000 +++ /etc/ansible/roles/ceph.ceph-common/defaults/main.yml 2017-05-26 08:58:30.417019878 +1000 @@ -338,7 +338,9 @@ # foo: 1234 # bar: 5678 # -ceph_conf_overrides: {} +ceph_conf_overrides: + global: + osd_pool_default_pg_num: 8 ############# @@ -373,4 +375,4 @@ # Set this to true to enable File access via NFS. Requires an MDS role. nfs_file_gw: true # Set this to true to enable Object access via NFS. Requires an RGW role. -nfs_obj_gw: false \ No newline at end of file +nfs_obj_gw: false That…

Continue ReadingSo you want to setup a Ceph dev environment using OSA

The Collapsing Empire

  • Post author:
  • Post category:Book

This is a fun fast read, as is everything by Mr Scalzi. The basic premise here is that of a set of interdependent colonies that are about to lose their ability to trade with each other, and are therefore doomed. Oh, except they don't know that and are busy having petty trade wars instead. It isn't a super intellectual read, but it is fun and does leave me wanting to know what happens to the empire...

Continue ReadingThe Collapsing Empire

Python3 venvs for people who are old and grumpy

  • Post author:
  • Post category:Python

I've been using virtualenvwrapper to make venvs for python2 for probably six or so years. I know it, and understand it. Now some bad man (hi Ramon!) is making me do python3, and virtualenvwrapper just isn't a thing over there as best as I can tell. So how do I make a venv? Its really not too bad... First, install the dependencies: git clone git://github.com/yyuu/pyenv.git .pyenv echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc echo 'eval "$(pyenv init -)"' >> ~/.bashrc git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv source ~/.bashrc Now to make a venv, do something like this (in this case, infrasot is the name of the venv): mkdir -p ~/.virtualenvs/pyenv-infrasot cd ~/.virtualenvs/pyenv-infrasot pyenv virtualenv system infrasot You can see your installed venvs like this: $ pyenv versions * system (set by /home/user/.pyenv/version) infrasot Where system is the system installed python, and not a venv. To activate and deactivate the venv, do this: $ pyenv activate infrasot $ ... stuff you're doing ... $ pvenv deactivate I'll probably write wrappers at some point so that this looks like virtualenvwrapper, but its good enough for now.

Continue ReadingPython3 venvs for people who are old and grumpy

End of content

No more pages to load