Upgrade via apt-get failed

I have been running a small GitLab CE server on Ubuntu server v14.04 for a while now. Every month or so, I patch the server with apt-get update / upgrade. It has always worked fine, until today. Any help would be appreciated.

adm-galvin@ubgit:~$ sudo apt-get upgrade
[sudo] password for adm-galvin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-100 linux-headers-3.13.0-100-generic
  linux-image-3.13.0-100-generic linux-image-extra-3.13.0-100-generic
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
  apparmor eject gitlab-ce libapparmor-perl libapparmor1 libc-bin libc6
  libfreetype6 libgnutls-openssl27 libgnutls26 libxml2 linux-generic
  linux-headers-generic linux-image-generic multiarch-support
15 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 291 MB/298 MB of archives.
After this operation, 55.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main gitlab-ce amd64 9.0.1-ce.0 [291 MB]
Fetched 291 MB in 2min 2s (2,376 kB/s)                                         
Preconfiguring packages ...
(Reading database ... 176708 files and directories currently installed.)
Preparing to unpack .../libc-bin_2.19-0ubuntu6.11_amd64.deb ...
Unpacking libc-bin (2.19-0ubuntu6.11) over (2.19-0ubuntu6.9) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libc-bin (2.19-0ubuntu6.11) ...
(Reading database ... 176708 files and directories currently installed.)
Preparing to unpack .../libc6_2.19-0ubuntu6.11_amd64.deb ...
Unpacking libc6:amd64 (2.19-0ubuntu6.11) over (2.19-0ubuntu6.9) ...
Setting up libc6:amd64 (2.19-0ubuntu6.11) ...
Processing triggers for libc-bin (2.19-0ubuntu6.11) ...
(Reading database ... 176708 files and directories currently installed.)
Preparing to unpack .../libgnutls-openssl27_2.12.23-12ubuntu2.7_amd64.deb ...
Unpacking libgnutls-openssl27:amd64 (2.12.23-12ubuntu2.7) over (2.12.23-12ubuntu2.6) ...
Preparing to unpack .../libgnutls26_2.12.23-12ubuntu2.7_amd64.deb ...
Unpacking libgnutls26:amd64 (2.12.23-12ubuntu2.7) over (2.12.23-12ubuntu2.6) ...
Preparing to unpack .../libxml2_2.9.1+dfsg1-3ubuntu4.9_amd64.deb ...
Unpacking libxml2:amd64 (2.9.1+dfsg1-3ubuntu4.9) over (2.9.1+dfsg1-3ubuntu4.8) ...
Preparing to unpack .../libfreetype6_2.5.2-1ubuntu2.6_amd64.deb ...
Unpacking libfreetype6:amd64 (2.5.2-1ubuntu2.6) over (2.5.2-1ubuntu2.5) ...
Preparing to unpack .../multiarch-support_2.19-0ubuntu6.11_amd64.deb ...
Unpacking multiarch-support (2.19-0ubuntu6.11) over (2.19-0ubuntu6.9) ...
Setting up multiarch-support (2.19-0ubuntu6.11) ...
(Reading database ... 176708 files and directories currently installed.)
Preparing to unpack .../eject_2.1.5+deb1+cvs20081104-13.1ubuntu0.14.04.1_amd64.deb ...
Unpacking eject (2.1.5+deb1+cvs20081104-13.1ubuntu0.14.04.1) over (2.1.5+deb1+cvs20081104-13.1) ...
Preparing to unpack .../libapparmor1_2.10.95-0ubuntu2.6~14.04.1_amd64.deb ...
Unpacking libapparmor1:amd64 (2.10.95-0ubuntu2.6~14.04.1) over (2.10.95-0ubuntu2.5~14.04.1) ...
Preparing to unpack .../libapparmor-perl_2.10.95-0ubuntu2.6~14.04.1_amd64.deb ...
Unpacking libapparmor-perl (2.10.95-0ubuntu2.6~14.04.1) over (2.10.95-0ubuntu2.5~14.04.1) ...
Preparing to unpack .../apparmor_2.10.95-0ubuntu2.6~14.04.1_amd64.deb ...
Unpacking apparmor (2.10.95-0ubuntu2.6~14.04.1) over (2.10.95-0ubuntu2.5~14.04.1) ...
Preparing to unpack .../linux-generic_3.13.0.113.123_amd64.deb ...
Unpacking linux-generic (3.13.0.113.123) over (3.13.0.113.122) ...
Preparing to unpack .../linux-image-generic_3.13.0.113.123_amd64.deb ...
Unpacking linux-image-generic (3.13.0.113.123) over (3.13.0.113.122) ...
Preparing to unpack .../linux-headers-generic_3.13.0.113.123_amd64.deb ...
Unpacking linux-headers-generic (3.13.0.113.123) over (3.13.0.113.122) ...
Preparing to unpack .../gitlab-ce_9.0.1-ce.0_amd64.deb ...
gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!)
Dumping database ... 
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...
[SKIPPED]
Dumping uploads ... 
[SKIPPED]
Dumping builds ... 
[SKIPPED]
Dumping artifacts ... 
[SKIPPED]
Dumping pages ... 
[SKIPPED]
Dumping lfs objects ... 
[SKIPPED]
Dumping container registry images ... 
[DISABLED]
Creating backup archive: 1490736361_2017_03_28_gitlab_backup.tar ... done
Uploading backup archive to remote storage  ... skipped
Deleting tmp directories ... done
done
Deleting old backups ... skipping
Unpacking gitlab-ce (9.0.1-ce.0) over (8.17.3-ce.0) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libgnutls26:amd64 (2.12.23-12ubuntu2.7) ...
Setting up libgnutls-openssl27:amd64 (2.12.23-12ubuntu2.7) ...
Setting up libxml2:amd64 (2.9.1+dfsg1-3ubuntu4.9) ...
Setting up libfreetype6:amd64 (2.5.2-1ubuntu2.6) ...
Setting up eject (2.1.5+deb1+cvs20081104-13.1ubuntu0.14.04.1) ...
Setting up libapparmor1:amd64 (2.10.95-0ubuntu2.6~14.04.1) ...
Setting up libapparmor-perl (2.10.95-0ubuntu2.6~14.04.1) ...
Setting up apparmor (2.10.95-0ubuntu2.6~14.04.1) ...
Installing new version of config file /etc/init.d/apparmor ...
 * Starting AppArmor profiles
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
   ...done.
 * Reloading AppArmor profiles
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
   ...done.
Setting up linux-image-generic (3.13.0.113.123) ...
Setting up linux-headers-generic (3.13.0.113.123) ...
Setting up linux-generic (3.13.0.113.123) ...
Setting up gitlab-ce (9.0.1-ce.0) ...


       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
	 ,,,,,,,****,,,,,,
	    .,,,***,,,,
		,*,.

     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:

sudo gitlab-ctl reconfigure

gitlab: GitLab should be reachable at https://ubgit.sccompanies.com
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab: 
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
gitlab: 
Checking PostgreSQL executables:Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab::postgresql-bin"]
Synchronizing Cookbooks:
  - gitlab (0.0.1)
  - package (0.0.0)
  - runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 1 resources
Recipe: gitlab::postgresql-bin
  * ruby_block[Link postgresql bin files to the correct version] action run
    - execute the ruby block Link postgresql bin files to the correct version

Running handlers:
Running handlers complete
Chef Client finished, 1/1 resources updated in 02 seconds
Checking PostgreSQL executables: OK
Shutting down all GitLab services except those needed for migrations
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 0s, normally up
ok: down: nginx: 0s, normally up
ok: down: postgresql: 0s, normally up
ok: down: redis: 1s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 1s, normally up
ok: run: postgresql: (pid 19130) 0s
ok: run: redis: (pid 19138) 0s
run: postgresql: (pid 19130) 0s; run: log: (pid 1073) 1127070s
run: redis: (pid 19138) 0s; run: log: (pid 1077) 1127070s
Reconfiguring GitLab to apply migrations
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
  - runit (0.14.2)
  - package (0.0.0)
  - gitlab (0.0.1)
Installing Cookbook Gems:
Compiling Cookbooks...

  *ERROR*: Encountered unsupported config key 'ci_nginx' in /etc/gitlab/gitlab.rb.

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================

NoMethodError
-------------
undefined method `[]=' for nil:NilClass

Cookbook Trace:
---------------
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:21:in `from_file'
  /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'

Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:

 14:  # See the License for the specific language governing permissions and
 15:  # limitations under the License.
 16:  #
 17:  
 18:  Gitlab[:node] = node
 19:  
 20:  if File.exists?('/etc/gitlab/gitlab.rb')
 21>>   Gitlab.from_file('/etc/gitlab/gitlab.rb')
 22:  end
 23:  
 24:  node.consume_attributes(Gitlab.generate_config(node['fqdn']))
 25:  

Platform:
---------
x86_64-linux


Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 01 seconds
dpkg: error processing package gitlab-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

Update: Saw that this problem was covered in Issue #2108. I commented out the offending ci_nginx statement in /etc/gitlab/gitlab.rb, then re-ran the upgrade. It completed without issues.