microsoft / oxa-tools

Open edX on Azure Tools
MIT License
36 stars 103 forks source link

OXA Bootstrap email notification missing #466

Open wladinho31 opened 4 years ago

wladinho31 commented 4 years ago

Hello all,

Two weeks ago, I have successfully deployed edX. Today, when I tried to deploy another environment using the same script, all resources are provisioned successfully, but I still don't received any OXA-Bootstrap email notification.

Does anyone of you had the same / similar issue?

Regards,

wladinho31 commented 4 years ago

And, deploy is not completed, of course. That is the biggest problem.

Thanks,

j-patrick23 commented 4 years ago

Yes, I experienced that issue too. I successfully deployed using the same script but it doesn't throw any notification email.

wladinho31 commented 4 years ago

Pretty strange. Infrastructure deploying is OK, but after that is "so quiet" :) I will try to deploy again today.

wladinho31 commented 4 years ago

I have tested again today, but still the same. Infrastructure is deployed, but 10 hours after, edX is not "live". Does anyone had the same issue?

Thanks,

RepoCloudSwyft commented 4 years ago

Hi Wladinho,

We have same issue here, Have you tried to connect on the jumpbox and vmss?

Have you seen the edx directory on /etc? bin boot datadisks dev edx etc home initrd.img initrd.img.old lib lib64 lost+found media mnt opt oxa proc root run sbin snap srv sys tmp usr var vmlinuz vmlinuz.old

Did you fix the issue?

egonid commented 4 years ago

Hello

We have same issue. We look into the jbvm, there is no edx folder. But normal jbvm which wsa deplyed on a few weeks ago. it has edx folder.

We are attaching two capture for "edx" folder. (normal jbvm and issued jbvm)

normal-jbvm

issued-jbvm

How do we resolve this issue?

Thanks in advance.

RepoCloudSwyft commented 4 years ago

Hi @egonid

We still ongoing on investigating the issue, we tried to deploy now same error no email notif and no edx and oxa folder.

Is their any update on msft side?

prabhanshu commented 4 years ago

Hi All, We tried to install on our end and there was no such issues. Can you share the logs as it will help us in investigating the issue?

egonid commented 4 years ago

Hi prabhanshu

We tried to install several times, we got same issue. So, We look into the log file and then we could find "GPG error" on mongodb installation process. We attach the bootstrap.csx.log file. Can you help us?

Thakns in advance.

===== a part of log file =========

08/28/19 19:01:20 :: Installing MongoDB Shell Executing: /tmp/tmp.wXgiRGskRG/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 gpg: requesting key EA312927 from hkp server keyserver.ubuntu.com gpg: key EA312927: public key "Totally Legit Signing Key mallory@example.org" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse 08/28/19 19:01:22 :: update package(s)... W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927 W: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release' is not signed. 08/28/19 19:01:24 :: install mongodb-org-shell package(s)... WARNING: The following packages cannot be authenticated! mongodb-org-shell E: There were unauthenticated packages and -y was used without --allow-unauthenticated 08/28/19 19:01:25 :: [ERROR] Installing mongodb-org-shell Failed on KHUjb.

bootstrap.csx.log

prabhanshu commented 4 years ago

Hi @egonid Got it. Is that a FullStack deployment or a Stamp deployment? Looks like issue is with GPG. Might have to fix this by updating keyserver and other details in 'mongodb-ubuntu-install.sh' for stamp deployment and edx-configuration in case of fullstack.

https://github.com/microsoft/oxa-tools/blob/fe2a04a959d28aad06e13afa16796eccbbd4ab0b/templates/stamp/mongodb-ubuntu-install.sh#L142

Reference: https://docs.mongodb.com/v3.2/tutorial/install-mongodb-on-ubuntu/

Though it might take time to validate and fix the issue. This is just my initial investigation

egonid commented 4 years ago

Hi prabhanshu

We had deployed with oxa/master.fic version and referenced the guide which is at "https://github.com/microsoft/oxa-tools/blob/oxa/dev.fic/images/openedx-on-azure-ficus-stamp-deployment-guide.pdf"

We have tried to deploy with modified "mongodb-ubuntu-install.sh" which likes below. It was failed to deploy.

[Modified mongodb-ubuntu-install.sh]

install_mongodb() { log "Downloading MongoDB package $PACKAGE_NAME from $PACKAGE_URL"

# Configure mongodb.list file with the correct location
if (( $(echo "$OS_VER > 16" | bc -l) ))
then
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
   **#1. The above is original source. -> It failed to install.**

    #apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EA312927
     **#2. Change parameter recv -> recv-keys, It failed to install.**

#apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xd68fa50fea312927
    **#3. Change key value, It failed to install.**

    echo "deb ${PACKAGE_URL} "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list

[end of source]

We tried to install with 3 options on as above. All options are fail to install and still showed sames GPG issues.

Are there any workaround or advice for us?

Thaks in advance.

egonid commented 4 years ago

Hi prabhanshu

How does below scripts is helpful?

if (( $(echo "$OS_VER > 16" | bc -l) ))
then
    wget -qO - https://www.mongodb.org/static/pgp/server-3.2.asc | sudo apt-key add -
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
    echo "deb ${PACKAGE_URL} "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
prabhanshu commented 4 years ago

Try this, if it works

if (( $(echo "$OS_VER > 16" | bc -l) ))
then
    curl -LO https://www.mongodb.org/static/pgp/server-3.2.asc
    gpg --import server-3.2.asc
    echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
wladinho31 commented 4 years ago

Try this, if it works

if (( $(echo "$OS_VER > 16" | bc -l) ))
then
    curl -LO https://www.mongodb.org/static/pgp/server-3.2.asc
    gpg --import server-3.2.asc
    echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

I have tried with this, but without success.

Regards,

egonid commented 4 years ago

Hello

We solved this issue (MongoDB install failed issue).

As you know, we cannot modify the repo of microsoft oxa-tools github source. (https://github.com/microsoft/oxa-tools)

If somebody would modify the source code like below, the issues will be gone. Two files are should be modified.

~\oxa-tools\templates\stamp\mongodb-ubuntu-install.sh ~\oxa-tools\templates\stamp\utilities.sh

[Modifying the source in mongodb-ubuntu-install.sh]

if (( $(echo "$OS_VER > 16" | bc -l) )) then apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 echo "deb ${PACKAGE_URL} "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list

=> modify to

if (( $(echo "$OS_VER > 16" | bc -l) )) then wget -qO - https://www.mongodb.org/static/pgp/server-3.2.asc | sudo apt-key add - echo "deb ${PACKAGE_URL} "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list

[Modifying the source in utilities.sh]

install-mongodb-shell() { if type mongo >/dev/null 2>&1; then log "MongoDB Shell is already installed" else log "Installing MongoDB Shell"

    PACKAGE_URL=http://repo.mongodb.org/apt/ubuntu
    SHORT_RELEASE_NUMBER=`lsb_release -sr`
    SHORT_CODENAME=`lsb_release -sc`

    if (( $(echo "$SHORT_RELEASE_NUMBER > 16" | bc -l) ))
    then
        apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
      echo "deb ${PACKAGE_URL} "${SHORT_CODENAME}"/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
    else

=> Modify to

install-mongodb-shell() { if type mongo >/dev/null 2>&1; then log "MongoDB Shell is already installed" else log "Installing MongoDB Shell"

    PACKAGE_URL=http://repo.mongodb.org/apt/ubuntu
    SHORT_RELEASE_NUMBER=`lsb_release -sr`
    SHORT_CODENAME=`lsb_release -sc`

    if (( $(echo "$SHORT_RELEASE_NUMBER > 16" | bc -l) ))
    then
       wget -qO - https://www.mongodb.org/static/pgp/server-3.2.asc | sudo apt-key add -
        echo "deb ${PACKAGE_URL} "${SHORT_CODENAME}"/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
    else

The above workaround should be applied on Microsoft Oxa-tools Github. But we don't have to permission to update that repo. So,we forked that repo to our private repo, and then modified another various files our forked repo. We can successfully deploy a Edx site without issue.

Thank you.