Problem installing remote execution plugin on Ubuntu (already known as issue 12993)

Hi there

Unfortunately I ran into the same issue (described here
<Bug #12993: PostgreSQL DuplicateColumn Error - foreman-tasks - Foreman>) #12993 when trying to
install the remote execution plugin on a already running Ubuntu (14.04.1)
with Puppet (3.8.6) and Foreman (1.10.2). Of course I tried the workaround
described Ivan Necas i.e. changing this file /usr/share/foreman/bundler.d/postgresql.rb
and then executing the command 'bundle install'. Interestingly the previous
error message was the same as described in the issue:

PG::DuplicateColumn: ERROR: column "version" of relation
"dynflow_schema_info" already exists

but after the workaround that got replaced by:

PG::Error: ERROR: relation "dynflow_actions" already exists

Before I tried the workaround I just deleted the version column and since
that didn't help also the whole table dynflow_schema_info but they always
got recreated and the error message on the foreman web ui stayed the same.
After the workaround and since I couldn't find any other solutions I
decided to also delete dynflow_actions. That changed the message to another
table/relation/index that apparently already exists. So step by step I
deleted all those tables/relations/indexes that were mentioned in the error
messages and finally I got the foreman web ui back and was able to log in.
Unfortunately that did not really solve the problem. Now I can see new menu
items (Hosts > Job templates, or Monitor > Recurring logics etc.)
but when clicking on them another error page loads. Furthermore when trying
to refresh the Smart Proxies I get the message that there are no changes
found.

Since evening is approaching and a coworker of mine is on call I don't want
to leave him this mess. Thus I will go back to my snapshot. But I (and some
team members) are very eager to try this feature. Any help in getting it to
work is thus greatly appreciated. Of course I will also try to help to
solve the problem with any information/logfiles you request. Just please
keep in mind that I'm neither a linux crack nor a developer and might need
some more detailed explaining than others when I have to run tests for you
guys.

Best regards,
Cyril

Hello,

it seems as combination of more issues. First, the existing one (#12993) which
should be "workaroundable" by downgrading pg gem as described in the issue.
Try running "foreman-rake db:migrate" and "foreman-rake db:seed" after your
manual changes (and with workaround applied), then restart your Foreman, that
should fix error pages. If not, please provide production.log that's generated
when you see error page.

Second, if proxy reports no new features (SSH), it might be caused by several
things. How did you install the proxy plugin, using installer or manually by
installing gem?

··· -- Marek

On Wednesday 09 of March 2016 08:51:13 cyril.stoll@wlan-partner.com wrote:

Hi there

Unfortunately I ran into the same issue (described here
http://projects.theforeman.org/issues/12993) #12993 when trying to
install the remote execution plugin on a already running Ubuntu (14.04.1)
with Puppet (3.8.6) and Foreman (1.10.2). Of course I tried the workaround
described Ivan Necas i.e. changing this file
/usr/share/foreman/bundler.d/postgresql.rb and then executing the command
’bundle install’. Interestingly the previous error message was the same as
described in the issue:

PG::DuplicateColumn: ERROR: column “version” of relation
"dynflow_schema_info" already exists

but after the workaround that got replaced by:

PG::Error: ERROR: relation “dynflow_actions” already exists

Before I tried the workaround I just deleted the version column and since
that didn’t help also the whole table dynflow_schema_info but they always
got recreated and the error message on the foreman web ui stayed the same.
After the workaround and since I couldn’t find any other solutions I
decided to also delete dynflow_actions. That changed the message to another
table/relation/index that apparently already exists. So step by step I
deleted all those tables/relations/indexes that were mentioned in the error
messages and finally I got the foreman web ui back and was able to log in.
Unfortunately that did not really solve the problem. Now I can see new menu
items (Hosts > Job templates, or Monitor > Recurring logics etc.)
but when clicking on them another error page loads. Furthermore when trying
to refresh the Smart Proxies I get the message that there are no changes
found.

Since evening is approaching and a coworker of mine is on call I don’t want
to leave him this mess. Thus I will go back to my snapshot. But I (and some
team members) are very eager to try this feature. Any help in getting it to
work is thus greatly appreciated. Of course I will also try to help to
solve the problem with any information/logfiles you request. Just please
keep in mind that I’m neither a linux crack nor a developer and might need
some more detailed explaining than others when I have to run tests for you
guys.

Best regards,
Cyril

Hi Marek

Second, if proxy reports no new features (SSH), it might be caused by
> several
> things. How did you install the proxy plugin, using installer or manually
> by
> installing gem?
>

Finally I found time to look at that again. As I saw that a new Foreman
release is out I upgraded to that and tried to install the remote execution
plugin again. This time I did not have those problems and the installation
worked as expected. So everything looks fine now.
Nevertheless thank you very much for your support.

Best regards,
Cyril