Quick overview of Ceph version running on OSDs

When checking a Ceph cluster it’s useful to know which versions you OSDs in the cluster are running.

There is a very simple on-line command to do this:

ceph osd metadata|jq '.[].ceph_version'|sort|uniq -c

Running this on a cluster which is currently being upgraded to Jewel to Luminous it shows:

     10 "ceph version 10.2.6 (656b5b63ed7c43bd014bcafd81b001959d5f089f)"
   1670 "ceph version 10.2.7 (50e863e0f4bc8f4b9e31156de690d765af245185)"
    426 "ceph version 10.2.9 (2ee413f77150c0f375ff6f10edd6c8f9c7d060d0)"
     66 "ceph version 12.2.1 (3e7492b9ada8bdc9a5cd0feafd42fbca27f9c38e) luminous (stable)"

So 66 OSDs are running Luminous and 2106 OSDs are running Jewel.

Starting with Luminous there is also this command:

ceph features

This shows us all daemon and client versions in the cluster:

{
    "mon": {
        "group": {
            "features": "0x1ffddff8eea4fffb",
            "release": "luminous",
            "num": 5
        }
    },
    "osd": {
        "group": {
            "features": "0x7fddff8ee84bffb",
            "release": "jewel",
            "num": 426
        },
        "group": {
            "features": "0x1ffddff8eea4fffb",
            "release": "luminous",
            "num": 66
        }
    },
    "client": {
        "group": {
            "features": "0x7fddff8ee84bffb",
            "release": "jewel",
            "num": 357
        },
        "group": {
            "features": "0x1ffddff8eea4fffb",
            "release": "luminous",
            "num": 7
        }
    }
}

Getting connection URL from (Flask) SQLAlchemy

While working with Flask‘s SQLAlchemy extension I ran into the case where I wanted to obtain the host I was connected to combined with the username and password.

As I didn’t want to parse the URL I provided earlier to SQLAlchemy (and I didn’t have it available at that part of the code) I looked for a method to obtain it from SQLAlchemy.

It turns out this is not (or poorly) documented, but the Engine object has a attribute called url.

>>> db.engine.url
mysql+mysqlconnector://sqlmanager:***@localhost/sqlmanager?charset=utf8
>>>

This is actually a sqlalchemy.engine.url.URL object which contains attributes with the connection information:

>>> url = db.engine.url
>>> url.host
'localhost'
>>> url.username
'sqlmanager'
>>> url.password
'supersecretpassword'
>>> url.database
'sqlmanager'
>>> 

This was the information I needed and allowed me to use this information elsewhere.

4 years of Tesla Model S ownership

4 years

Last year I wrote a blogpost about 3 years of Model S ownership. Well, it’s a year later, so it’s time to write a post about 4 years of ownership 🙂

Do I still like my Model S? Best car I’ve ever owned!

The numbers

Some numbers about last year:

  • Last year my Model S had driven 141.466km, and another year later the counter is at 187.058km. A total of 45.592km in one year.
  • My average energy consumption still hovers somewhere around 200Wh/km.
  • A full charge (100%) yields 380km and a 90% charge 341km.

Roadtrips

The Model S is still my only car and I still take roadtrips with it. This year I took a few roadtrips:

  • 1.400km roadtrip to the UK and back (SuperChargers at the channel tunnel, yay!)
  • 3.500km to Milan/Rome for a summer vacation.
  • 2.000km roadtrip to Munich for Oktoberfest.

Pictures

A few pictures how my Model S still looks like after 4 years. Personally I can’t find any real signs of wear on the exterior nor interior.

Using a Destination Charger in Tuscany, Italy

Tesla charging stations (22kW) at our new office

Break-in in Rome

While parked in Rome people broke in to the car and stole clothing. And punctured the rear wheels…

Accident in Milan

On the way back from Rome a small truck changed lane and hit us. Nobody got hurt, just some damage to the car.

Conclusion

After 4 years my Model S is still doing just fine! No wear and tear, no severe battery degradation or major failures. The car just works!

I’ll probably keep this Model S until it turns 5 next year and buy a new one. Will I buy a Tesla again? Yes, no doubt!