####given a commit SHA, find out if a deployed wheel contains that commit
i.e. Does our deployed neutron wheel contain a commit with a SHA of 9ff5bb967105451a1c3c1a6dfdbeb0ec979afaeb
#####1. find out the sha of the commit from which our wheel was built Log in to the neutron container of interest and get info on the wheel:
# lxc-attach -n aio1_neutron_agents_container-28d6792d
# pbr info neutron
neutron 2014.2.4.dev9 pre-release 1fafe42
The last thing on the line is the SHA of the commit from which the wheel was built. Now we just need to find out if that contains the commit we are interested in.
#####2. examine the commit history On any linux box, we need to clone the neutron repo and examine the commit history
# git clone https://github.com/openstack/neutron.git
# cd neutron
The format of the command we're going to run is:
git rev-list <SHA from which wheel was built> | grep <commit SHA that we are interested in>
So for our example:
# git rev-list 1fafe42 | grep 9ff5bb967105451a1c3c1a6dfdbeb0ec979afaeb
9ff5bb967105451a1c3c1a6dfdbeb0ec979afaeb
The fact that we did get a result from grep means that this wheel does in fact contain that commit.
What we're doing with that last command is saying
'list all the ancestor commits of commit object 1fafe42
, and tell me if any of them are 9ff5bb967105451a1c3c1a6dfdbeb0ec979afaeb
'