Email issues when creating account on Instagram

So recently I was trying to signup for an account on Instagram but to my surprise I got a message saying I already had an account with Instagram. If I ever signed up for an account it must have been a long time ago since I didn't have the creds on my LastPass or any traces of emails sent by Instagram to my email account.

In any case I then tried to reset the password in my unknown existing account when to my second surprise I got this message back:

That was really frustrating since I thought I wasn't going to be able to use my email with Instagram for some technical issue that made my account to get locked and unreachable.
After googling for a bit and getting nowhere I suddenly recollected, probably from an old Security Now podcast, the mention that Steve Gibson made that you could add a + to a gmail address and google would still be able to reach your account.

If that was possible, then technically I would be able to register another account on Instagram using a different email handler but pointing to my actual gmail account.
I found this post in the Gmail blog describing in more details

Append a plus ("+") sign and any combination of words or numbers after your email address. For example, if your name was hikingfan@gmail.com, you could send mail to hikingfan+friends@gmail.com or hikingfan+mailinglists@gmail.com.

Insert one or several dots (".") anywhere in your email address. Gmail doesn't recognize periods as characters in addresses -- we just ignore them. For example, you could tell people your address was hikingfan@gmail.com, hiking.fan@gmail.com or hi.kin.g.fan@gmail.com. (We understand that there has been some confusion about this in the past, but to settle it once and for all, you can indeed receive mail at all the variations with dots.)  

I put that to a test and as expected I was able to register an account on Instagram with the email diogogmt+instagram@gmail.com

Now, the funny part is that I've been giving my email for years as diogo.gmt@gmail.com even though the actual email is just diogogmt@gmail.com

Dockerizing Microservices - FSOSS 2015 Presentation

This year at the Free Software and Open Source Symposium I had the great pleasure of giving a talk with Raffi about our experiences utilizing Docker and Microservice patterns at Cloud Dynamics.

For me it marked a good step since 6 years ago when I moved to Toronto I remember attending FSOSS as a volunteer and at that first event watching the talk from Armen Zambrano's, at that time a fresh graduate from the Software Development BSD program working at the Mozilla's office in California. Since then I got inspired to on day graduate from the same program and be a presenter at FSOSS.

Overall the experience was really positive, I saw some old friends from the college days, spoke with a few professors and chatted with other presenters at the speaker's dinner hosted by Seneca.

Here are the links to the presentation slides and the video recording.

Managing Docker on Ubuntu 15.04 Vivid

There were some big changes introduced on Ubuntu 15.04. Systemd is now the default system manager tool instead of UpStart like in previous Ubuntu releases.
There is a good comparison in the Ubuntu wiki.

So how does that affect Docker?

  1. Configuring Docker
  2. Accessing Logs
  3. Managing the service

Configuring Docker

With UpStart the file /etc/default/docker had to be modified to configure settings for the docker demon. Now with Systemd the file /lib/systemd/system/docker.service needs to be modified instead.

Example
/lib/systemd/system/docker.service

[Unit]
Description=Docker Application Container Engine  
Documentation=https://docs.docker.com  
After=network.target docker.socket  
Requires=docker.socket

[Service]
Type=notify  
ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --bip=172.17.0.1/16 --dns=172.17.0.1  
MountFlags=slave  
LimitNOFILE=1048576  
LimitNPROC=1048576  
LimitCORE=infinity

[Install]
WantedBy=multi-user.target  

To enable the remote API just modify the ExecStart attribute under the service category to ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock

Just as a note you might also find the file /etc/systemd/system/multi-user.target.wants/docker.service However, it gets overwritten with the settings in the /lib/systemd/system/docker.service

Note: Make sure you reload the service daemon so the changes can take effect: systemctl daemon-reload

Accessing Logs

With UpStart all the Docker daemon logs were stored at /var/log/upstart/docker.log
Now with Sytemd you need to use journalctl

  • To dump all the logs: journalctl -u docker.service
  • To follow the logs: journalctl -u docker.service -f

Managing the service

With UpStart to manage the Docker service the service tool would allow to get the status, start, stop and restart Docker. To enable Docker to start on boot the update-rc.d tool would manage its settings.

Now with Systemd we need to use the systemctl tools instead

  • Get status of the Docker service: systemctl status docker
  • Enable Docker service to start on boot: systemctl enable docker

Resizing Kolla Vagrant CentOS base box

At the time of this writing Kolla uses the puppetlabs/centos-7.0-64-puppet as the base box for the Vagrant Virtual Box provider.
The main issue with the selected base box is that it only has a 20GB root disk. However, Kolla needs at least a 40GB disk when doing a All In One installation.

I ran into the following error when using the default 20GB base box:

The following SSH command responded with a non-zero exit status.  
Vagrant assumes that this means the command failed!  
cat /tmp/vagrant-network-entry_enp0s8 >> /etc/sysconfig/network-scripts/ifcfg-enp0s8  
Stdout from the command:  
Stderr from the command:  
cat: write error: No space left on device  

The temporary solution just to get Kolla installed using Vagrant without any further modifications is to resize the puppetlabs/centos-7.0-64-puppet base box to have a larger disk size.

Create Vagrant VM

After cloning the kolla repository, navigate to kolla/dev/vagrant and run vagrant up
Then shutdown the VM vagrant halt

Find Disk to be resized

List all VMS VBoxManage list vms

Keep note of the VM name
Example: "vagrant_operator_1446740538626_12437" {29db98c9-b085-4ecc-be9b-dba01d8c2256}

Find the VM disk: VBoxManage showvminfo vagrant_operator_1446740538626_12437 | | grep vmdk
Example: IDE Controller (0, 0): /Volumes/diogogmtdata/VirtualBox VMs/vagrant_operator_1446740538626_12437/packer-centos-7.0-x86_64-virtualbox-vagrant-puppet-1438003672-disk1.vmdk (UUID: 3ca3b592-784e-4dc2-9e84-af0b63bec83f)

Resize the disk

Convert VMDK disk to VDI: VBoxManage clonehd packer-centos-7.0-x86_64-virtualbox-vagrant-puppet-1438003672-disk1.vmdk vagrant-puppet-disk1.vdi --format vdi

Resize the VDI disk: VBoxManage modifyhd vagrant-puppet-disk1.vdi --resize 61440

Attach resized disk into the VM

Find the storage controller name: VBoxManage showvminfo vagrant_operator_1446740538626_12437 | grep Storage
Example: Storage Controller Name (0): IDE Controller

Attach disk into the VM: VBoxManage storageattach vagrant_operator_1446740538626_12437 --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium vagrant-puppet-disk1.vdi

Note: By attaching as device 0 automatically will detach the existing disk

Create new primary partition

Start again the VM: vagrant reload && vagrant ssh

Using fdisk: fdisk /dev/sda

Command: n

  • Partition type: p (primary)
  • Partition number (3,4, default 3): 3
  • Use default value for first and last sectors

Command: t

  • Partition number (1-3, default 3): 3
  • Hex code (type L to list all codes): 8e

Command: w

Reboot VM: reboot

Extend partition

Create physical volume: pvcreate /dev/sda3

Extend volume group: vgextend centos /dev/sda3

Extend partition: lvextend -l +100%FREE /dev/mapper/centos-root

Since CentOS uses XFS as the file system you can't use resize2fs to resize the partition.

Instead use xfxgrowfs:
Install xfx
growfs: yum install -y xfsprogs.x86_64
Resize partition: xfs_growfs /dev/mapper/centos-root

Notes:

Executing script on the host when running Vagrant commands

When running Vagrant commands there might be the need to execute something on the host as a pre setup requirement.

Since Vagrant is built with ruby it is possible to execute a shell script utilizing the system utility

system("script.sh")  

In some cases you might want to run a script only in a certain command of Vagrant, for example, when reloading the Vagrant box you might need to check if your host has all gateway routes configured or any other pre setup task.

system("  
  if [ #{ARGV[0]} = 'reload' ]; then
    echo 'Setting up routes on the host when reloading Vagrant box'
    ./set-up-routes.sh
  fi
")