7.8.1 install failing when running reconfigure after install (repeat of issue 171 & 240)

In Ubuntu 14.04 (ami-234ecc54, if you are setting up in Amazon).

Gitlab package gitlab_7.8.1-ee.omnibus-1_amd64.deb (downloaded from HIDDEN)

Running a 'new' install (nothing in /var/opt/gitlab)

I have this in my /etc/gitlab/gitlab.rb

   # EBS volume mounted at /var/opt/gitlab
   git_data_dir "/var/opt/gitlab"

When I run 'sudo gitlab-ctl reconfigure' , I get the following error in the output from "Recipe: gitlab::postgresql"

   * group[gitlab-psql] action create (up to date)
   * user[gitlab-psql] action create (up to date)
   * directory[/var/opt/gitlab/postgresql] action create (up to date)
   * directory[/var/opt/gitlab/postgresql/data] action create (up to date)
   * directory[/var/log/gitlab/postgresql] action create (up to date)
   * link[/var/opt/gitlab/postgresql/data] action create (skipped due to not_if)
   * file[/var/opt/gitlab/postgresql/.profile] action create (up to date)
   * service[procps] action nothing (skipped due to action :nothing)
   * template[/etc/sysctl.d/90-postgresql.conf] action create (up to date)
   * execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] action run
    ================================================================================
    Error executing action `run` on resource 'execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8]'
    ================================================================================
    
    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
    STDOUT: The files belonging to this database system will be owned by user "gitlab-psql".
    This user must also own the server process.

    The database cluster will be initialized with locale "C".
    The default text search configuration will be set to "english".
    STDERR: initdb: could not access directory "/var/opt/gitlab/postgresql/data": Permission denied
    ---- End output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
    Ran /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 returned 1

What I believe may be more important...is from way early in the output (not an error but the fact that it is chmodding /var/opt/gitlab to 700:

 Converging 192 resources
   * directory[/etc/gitlab] action nothing (skipped due to action :nothing)
   * directory[/var/opt/gitlab] action create
     - change mode from '0777' to '0755'
     - change owner from 'git' to 'root'

   * directory[/opt/gitlab/embedded/etc] action create (up to date)
   * template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
 Recipe: gitlab::users
   * directory[/var/opt/gitlab] action create (up to date)
   * group[git] action create (up to date)
   * user[git] action create (up to date)
   * template[/var/opt/gitlab/.gitconfig] action create (up to date)
 Recipe: gitlab::web-server
   * group[gitlab-www] action create (up to date)
   * user[gitlab-www] action create (up to date)
 Recipe: gitlab::gitlab-shell
   * directory[/var/opt/gitlab/repositories] action create (up to date)
   * directory[/var/opt/gitlab/.ssh] action create (up to date)
   * file[/var/opt/gitlab/.ssh/authorized_keys] action create (up to date)
   * file[/opt/gitlab/embedded/service/gitlab-shell/authorized_keys.lock] action create (up to date)
   * execute[chcon --recursive --type ssh_home_t /var/opt/gitlab/.ssh] action run (skipped due to only_if)
   * directory[/var/log/gitlab/gitlab-shell/] action create (up to date)
   * directory[/var/opt/gitlab/gitlab-shell] action create (up to date)
   * directory[/var/opt/gitlab] action create
     - change mode from '0755' to '0700'
     - change owner from 'root' to 'git'

I remembered that in a previous POC installation with pre-existing content in /var/opt/gitlab & running upgrades, after installing the 'new' package, I had to run a chmod 755 on /var/opt/gitlab before restarting gitlab...or I would run into permissions issues as well. Being that I didn't have any data in /var/opt/gitlab on this host, I suspect the chef recipes had quite a bit more to do. I also remembered that Jeff (the guy that had setup our POC install from scratch, made a comment about a bug in the chef recipe)

After finding tickets 171 & 240, I modified line 68 of /opt/gitlab/embedded/cookbooks/gitlab/recipes/gitlab-shell.rb from

      mode "0700"

to

      mode "0755"

I re-ran gitlab-ctl reconfigure & gitlab-ctl restart ... and it worked just fine.