Older blog entries for mikal (starting at number 946)

Citadel




ISBN: 9781451637571
LibraryThing
This book follows on from Live Free or Die. I like the approach of this book, as it follows a couple of relatively normal people trying to get by, and how the main protagonist from the last book's actions affect them. Its an engaging read, while still progressing the overall arc of the series. I really enjoyed it.

Tags for this post: book john_ringo alien invasion combat troy_rising
Related posts: Live Free or Die; Isaac Asimov's Robot City: Robots and Aliens: Humanity; Isaac Asimov's Robot City: Robots and Aliens: Maverick; Dragon's Egg; Starquake; Isaac Asimov's Robot City: Robots and Aliens: Changeling


Comment

Syndicated 2014-03-05 18:34:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

The Runaway Jury




ISBN: 0440221471
Dell (1997), Mass Market Paperback, 560 pages
LibraryThing
This is an older book now, and I read it many many years ago but re-read it this last couple of weeks. I enjoyed this book. Its believable (if a little dated now), and interesting. It certainly made me think more about the first amendment and how it affects dangerous products like cigarettes than I would have otherwise.

Tags for this post: book john_grisham court law jury litigation cigarette
Related posts: Brazilian police to old lady: "Please sue us!"; Please report to the municipal hall of justice; Kynan's going to be in trouble...


Comment

Syndicated 2014-02-28 23:49:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

25 Feb 2014 (updated 25 Feb 2014 at 01:08 UTC) »

NBNCo likely to miss its rollout targets

In December 2013 NBNCo issued a strategic review ordered by Malcolm Turnbull. In this review, they stated that their target for number of premises passed by June 2014 was 637,000 of the 10,910,000 premises in Australia. How are they going on that goal? Well, there are currently 303,905 premises passed in Australia, with around 6,000 more being added per week. That means they're in deep trouble -- they need to be averaging more like 17,000 premises a week at this point to meet their goal. This is especially depressing because the goal is only a few months old and already looking grim.

(Update: so apparently I misread the NBN strategic review having watched the Senate estimates hearing just now. The NBN target for 30 June 2014 is 357,000 not 600,000. This is a difference between the numbers of page 46 or the report and those on page 48. The 357,000 number is so low, that NBNCo will probably meet that target.)

While I think its true that the Labor party didn't cover itself with glory in managing the NBN rollout, I have to say that Malcolm isn't doing much better. Especially now that he's reneged on the 25mbit by the end of 2016 promise he took to the election.

You can see more about the state of the NBN rollout in my Google spreadsheet. I read the boring NBN documents so you don't have to!

Tags for this post: blog nbn politics
Related posts: The Moon Is A Harsh Mistress; Daughter of the Empire; Servant of the Empire; Dublin trip; Mistress of the Empire; I am sometimes amazed by the childlike political discourse in the US

Comment

Syndicated 2014-02-24 15:58:00 (Updated 2014-02-25 01:08:35) from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

Live Free or Die




ISBN: 9781439133972
LibraryThing
This book is useful. When the Earth is invaded by evil aliens intent on stripping us of our heavy metals, I now know how to fight back using just Maple Syrup and a Death Star I just happen to have hanging around. That's education right there. This book is delightfully not sexist compared with some of Ringo's other books, which makes me happy. It does lack strong female characters, but at least they're not being used for titillation (refer to Cally's War for an example of how this isn't always true). I enjoyed this book.

Tags for this post: book john_ringo alien invasion combat
Related posts: Isaac Asimov's Robot City: Robots and Aliens: Humanity; Isaac Asimov's Robot City: Robots and Aliens: Maverick; Dragon's Egg; Starquake; Isaac Asimov's Robot City: Robots and Aliens: Changeling; Speaker For The Dead


Comment

Syndicated 2014-02-14 19:53:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

A Talent for War




ISBN: 0441795536
LibraryThing
This is my first McDevitt book, and it was a pleasant surprise. A bit of a mystery novel, but set in the far future. Well written, interesting and fun. I enjoyed it.

Tags for this post: book jack_mcdevitt mystery aliens combat
Related posts: Winchester Mystery House


Comment

Syndicated 2014-02-06 21:47:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

31 Jan 2014 (updated 31 Jan 2014 at 01:07 UTC) »

NBNCo's ACT deployment, rolling out in the direction of backwards

So those who follow me on twitter wont be surprised to discover that since last night I've been chasing NBNCo rollout statistics for the ACT. It turns out they now do weekly rollout reports (good), but make it hard to find historical ones (bad). So, I made an index of the reports, which you can see at http://www.stillhq.com/nbnco/.

I also did some historical analysis for the ACT, and its not good. In fact, it seems we've rolled out -24 premises in the last two months. That's right, we're going backwards:



Oh course, NBNCo doesn't respond on twitter to a request for an explanation, but that's what I've come to expect.

Tags for this post: blog nbnco rollout

Comment

Syndicated 2014-01-30 15:56:00 (Updated 2014-01-31 01:07:23) from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

Weird email of the day

I've got nothing:

Hello, I visited your profile at (github.com) and I find out that you're the type my heart love, I believe we suit for real love, let walk that precious thing out for heart desire, I hope and believe we match for good. When contacting reply to my mail address (helen_kalushi@hotmail.com) I am waiting for the love. I am, Miss helen


True love is a beautiful thing.

Tags for this post: blog github strange email
Related posts: Why document management is good; Internet outage; What the heck are you talking about?; 120 emails over night from "trapper"; Very behind in email land; Ewwww

Comment

Syndicated 2014-01-29 15:36:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

Just storing this here -- how to fix the keyboard bindings on MacOS

Just in case I am ever trapped again, these instructions made the Mac work like every other keyboard ever.

Tags for this post: link macos keyboard bindings fix
Related posts: PNGtools 0.4; Update on the Dell e310

Comment

Syndicated 2014-01-27 23:40:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

The Long Earth




ISBN: 9780062068682
LibraryThing
Lana put me onto this book while on a trip to Texas, and I have to say I like it. This is very unlike the other Terry Pratchett books I've read, in that whilst it is occasionally amusing, it isn't really an attempt at humor. It is instead a relatively methodical examination of the impact of discovering a series of inhabitable earths a trivial amount of distance away from our own. I also have to say I like the ending, not in the sense of liking what happens, but in the sense that it wasn't a twee or overly convenient way to stop the book. A good read.

Tags for this post: book terry_pratchett_and_stephen_baxter terry_pratchett stephen_baxter travel population terrorism
Related posts: Caves of Steel; Robots and Empire ; Logan's Run ; Space Soldiers; Robots of Dawn ; Naked Sun


Comment

Syndicated 2014-01-26 17:13:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

Comparing alembic with sqlalchemy migrate

In the last few days there has been a discussion on the openstack-dev mailing list about converting nova to alembic. Nova currently uses sqlalchemy migrate for its schema migrations. I would consider myself a sceptic of this change, but I want to be a well educated sceptic so I thought I should take a look at an existing alembic user, in this case neutron. There is also at least one session on database changes at the Icehouse summit this coming week, and I wanted to feel prepared for those conversations.

I should start off by saying that I'm not particularly opposed to alembic. We definitely have problems with migrate, but I am not sure that these problems are addressed by alembic in the way that we'd hope. I think we need to dig deeper into the issues we face with migrate to understand if alembic is a good choice.

sqlalchemy migrate

There are two problems with migrate that I see us suffering from at the moment. The first is that migrate is no longer maintained by upstream. I can see why this is bad, although there are other nova dependencies that the OpenStack team maintains internally. For example, the various oslo libraries and the oslo incubator. I understand that reducing the amount of code we maintain is good, but migrate is stable and relatively static. Any changes made will be fixes for security issues or feature changes that the OpenStack project wants. This relative stability means that we're unlikely to see gate breakages because of unexpected upstream changes. It also means that when we want to change how migrate works for our convenience, we don't need to spend time selling upstream on that change.

The other problem I see is that its really fiddly to land database migrations in nova at the moment. Migrations are a linear stream though time implemented in the form of a sequential number. So, if the current schema version is 227, then my new migration would be implemented by adding the following files to the git repository:

    184_implement_funky_feature.py
    184_sqlite_downgrade.sql
    184_sqlite_upgrade.sql
    


    In this example, the migration is called "implement_funky_feature", and needs custom sqlite upgrades and downgrades. Those sqlite specific files are optional.

    Now the big problem here is that if there is more than one patch competing for the next migration number (which is quite common), then only one patch can win. The others will need to manually rebase their change by renaming these files and then have to re-attempt the code review process. This is very annoying, especially because migration numbers are baked into our various migration tests.

    "Each" migration also has migration tests, which reside in nova/tests/db/test_migrations.py. I say each in quotes because we haven't been fantastic about actually adding tests for all our migrations, so that is imperfect at best. When you miss out on a migration number, you also need to update your migration tests to have the new version number in them.

    If we ignore alembic for a moment, I think we can address this issue within migrate relatively easily. The biggest problem at the moment is that migration numbers are derived from the file naming scheme. If instead they came from a configuration file, then when you needed to change the migration number for your patch it would be a one line change in a configuration file, instead of a selection of file renames and some changes to tests. Consider a configuration file which looks like this:

      mikal@e7240:~/src/openstack/nova/nova/db/sqlalchemy/migrate_repo/versions$ cat versions.json | head
      {
          "133": [
              "folsom.py"
          ], 
          "134": [
              "add_counters_to_bw_usage_cache.py"
          ], 
          "135": [
              "add_node_to_instances.py"
          ], 
      ...
      


      Here, the only place the version number appears is in this versions.json configuration file. For each version, you just list the files present for the migration. In each of the cases here its just the python migration, but it could just as easily include sqlite specific migrations in the array of filenames.

      Then we just need a very simple change to migrate to prefer the config file if it is present:

        diff --git a/migrate/versioning/version.py b/migrate/versioning/version.py index d5a5be9..cee1e66 100644 --- a/migrate/versioning/version.py +++ b/migrate/versioning/version.py @@ -61,22 +61,31 @@ class Collection(pathed.Pathed): """ super(Collection, self).__init__(path) - # Create temporary list of files, allowing skipped version numbers. - files = os.listdir(path) - if '1' in files: - # deprecation - raise Exception('It looks like you have a repository in the old ' - 'format (with directories for each version). ' - 'Please convert repository before proceeding.') - - tempVersions = dict() - for filename in files: - match = self.FILENAME_WITH_VERSION.match(filename) - if match: - num = int(match.group(1)) - tempVersions.setdefault(num, []).append(filename) - else: - pass # Must be a helper file or something, let's ignore it. + # NOTE(mikal): If there is a versions.json file, use that instead of + # filesystem numbering + json_path = os.path.join(path, 'versions.json') + if os.path.exists(json_path): + with open(json_path) as f: + tempVersions = json.loads(f.read()) + + else: + # Create temporary list of files, allowing skipped version numbers. + files = os.listdir(path) + if '1' in files: + # deprecation + raise Exception('It looks like you have a repository in the ' + 'old format (with directories for each ' + 'version). Please convert repository before ' + 'proceeding.') + + tempVersions = dict() + for filename in files: + match = self.FILENAME_WITH_VERSION.match(filename) + if match: + num = int(match.group(1)) + tempVersions.setdefault(num, []).append(filename) + else: + pass # Must be a helper file or something, let's ignore it. # Create the versions member where the keys # are VerNum's and the values are Version's.


      There are some tweaks required to test_migrations.py as well, but they are equally trivial. As an aside, I wonder what people think about moving the migration tests out of the test tree and into the versions directory so that they are beside the migrations. This would make it clearer which migrations lack tests, and would reduce the length of test_migrations.py, which is starting to get out of hand at 3,478 lines.

      There's one last thing I want to say about migrate migrations before I move onto discussing alembic. One of the features of migrate is that schema migrations are linear, which I think is a feature not a limitation. In the Havana (and presumably Icehouse) releases there has been significant effort from Mirantis and Rackspace Australia to fix bugs in database migrations in nova. To be frank, we do a poor job of having reliable migrations, even in the relatively simple world of linear migrations. I strongly feel we'd do an even worse job if we had non-linear migrations, and I think we need to require that all migrations be sequential as a matter of policy. Perhaps one day when we're better at writing migrations we can vary that, but I don't think we're ready for it yet.

      Alembic

      An example of an existing user of alembic in openstack is neutron, so I took a look at their code to work out what migrations in nova using alembic might look like. First off, here's the work flow for adding a new migration:

      First off, have a read of neutron/db/migration/README. The process involves more tools than nova developers will be used to, its not a simple case of just adding a manually written file to the migrations directory. First off, you need access to the neutron-db-manage tool to write a migration, so setup neutron.

      Just as an aside, the first time I tried to write this blog post I was on an aeroplane, with no network connectivity. Its is frustrating that writing a new database migration requires network connectivity if you don't already have the neutron tools setup in your development environment. Even more annoyingly, you need to have a working neutron configuration in order to be able to add a new migration, which slowed me down a fair bit when I was trying this out. In the end it seems the most expedient way to do this is just to run up a devstack with neutron configured.

      Now we can add a new migration:

        $ neutron-db-manage --config-file /etc/neutron/neutron.conf \
        --config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
        revision -m "funky new database migration" \
        --autogenerate
        No handlers could be found for logger "neutron.common.legacy"
        INFO  [alembic.migration] Context impl MySQLImpl.
        INFO  [alembic.migration] Will assume non-transactional DDL.
        INFO  [alembic.autogenerate] Detected removed table u'arista_provisioned_tenants'
        INFO  [alembic.autogenerate] Detected removed table u'ml2_vxlan_allocations'
        INFO  [alembic.autogenerate] Detected removed table u'cisco_ml2_nexusport_bindings'
        INFO  [alembic.autogenerate] Detected removed table u'ml2_vxlan_endpoints'
        INFO  [alembic.autogenerate] Detected removed table u'arista_provisioned_vms'
        INFO  [alembic.autogenerate] Detected removed table u'ml2_flat_allocations'
        INFO  [alembic.autogenerate] Detected removed table u'routes'
        INFO  [alembic.autogenerate] Detected removed table u'cisco_ml2_credentials'
        INFO  [alembic.autogenerate] Detected removed table u'ml2_gre_allocations'
        INFO  [alembic.autogenerate] Detected removed table u'ml2_vlan_allocations'
        INFO  [alembic.autogenerate] Detected removed table u'servicedefinitions'
        INFO  [alembic.autogenerate] Detected removed table u'servicetypes'
        INFO  [alembic.autogenerate] Detected removed table u'arista_provisioned_nets'
        INFO  [alembic.autogenerate] Detected removed table u'ml2_gre_endpoints'
          Generating /home/mikal/src/openstack/neutron/neutron/db/migration/alembic_migrations/
        versions/297033515e04_funky_new_database_m.py...done
        


        This command has allocated us a migration id, in this case 297033515e04. Interestingly, the template migration drops all of the tables for the ml2 driver, which is a pretty interesting choice of default.

        There are a bunch of interesting headers in the migration python file which you need to know about:

          """funky new database migration
          
          Revision ID: 297033515e04
          Revises: havana
          Create Date: 2013-11-04 17:12:31.692133
          
          """
          
          # revision identifiers, used by Alembic.
          revision = '297033515e04'
          down_revision = 'havana'
          
          # Change to ['*'] if this migration applies to all plugins
          
          migration_for_plugins = [
              'neutron.plugins.ml2.plugin.Ml2Plugin'
          ]
          


          The developer README then says that you can check your migration is linear with this command:

            $ neutron-db-manage --config-file /etc/neutron/neutron.conf \
            --config-file /etc/neutron/plugins/ml2/ml2_conf.ini check_migration
            


            In my case it is fine because I'm awesome. However, it is also a little worrying that you need a tool to hold your hand to verify this because its too hard to read through the migrations to verify it yourself.

            So how does alembic go with addressing the concerns we have with the nova database migrations? Well, alembic is currently supported by an upstream other than OpenStack developers, so alembic addresses that concern. I should also say that alembic is obviously already in use by other OpenStack projects, so I think it would be a big ask to move to something other than alembic.

            Alembic does allow linear migrations as well, but its not enforced by the tool itself (in other words, non-linear migrations are supported by the tooling). That means there's another layer of checking required by developers in order to maintain a linear migration stream, and I worry that will introduce another area in which we can make errors and accidentally end up with non-linear migrations. In fact, in the example of multiple patches competing to be the next one in the line alembic is worse, because the headers in the migration file would need to be updated to ensure that linear migrations are maintained.

            Conclusion

            I'm still not convinced alembic is a good choice for nova, but I look forward to a lively discussion at the design summit about this.

            Tags for this post: openstack icehouse migrate alembic db migrations
            Related posts: Exploring a single database migration; On Continuous Integration testing for Nova DB

            Comment

            Syndicated 2013-11-03 22:52:00 from stillhq.com : Mikal, a geek from Canberra living in Silicon Valley (no blather posts)

937 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!