About issue 15223

Hello,

I meet this bug : Bug #15223: Resolving templates to provision a discovered host fails - Foreman, and I want
to patch the application.js file, but I can't find it on the filesystem.
When browsing the /usr/share/foreman, I can't find the subdirectory
app/assets. All other ones are presents :

drwxr-xr-x. 4 root root 4096 6 juin 18:21 controllers
drwxr-xr-x. 2 root root 4096 6 juin 18:17 helpers
drwxr-xr-x. 2 root root 98 6 juin 18:17 mailers
drwxr-xr-x. 15 root root 4096 6 juin 18:17 models
drwxr-xr-x. 2 root root 29 6 juin 18:17 observers
drwxr-xr-x. 14 root root 4096 6 juin 18:21 services
drwxr-xr-x. 2 root root 4096 6 juin 18:17 validators
drwxr-xr-x. 59 root root 4096 6 juin 18:21 views

But my foreman seems to work as expected (except that bug), how is it
possible without this directory???

My foreman is 1.11.2 and I successfully migrated from katello 2.4 to 3.0
RC8 (el7)

Where can I patch this file? I tried to rsync the missing directory from
source, but it is the same issue.

I saw that the patch will be merged into the 1.11.3 release, but I'd like
to understand what is happening there, just to be sure that my foreman
doesn't have too many missing files.

Thank you for your help.

Thank you for your quick answer.
the concerning patch
http://projects.theforeman.org/projects/foreman/repository/revisions/ad2ee95611dcc2dcd6a1163b95a6e4e12b0394b3/diff/app/assets/javascripts/application.js
changes a "?" into a "&" character.
After doing this into the compressed and the minimized js file, I restarted
the httpd service, but the issue is the same:
"/hosts/template_used?id=209&provisioning=build"
According to the comment, the patch aims to delete the "provisionnig=buid"
query parameter
If I understand, this issue began with the appration of the checkbox "Build
mode Enable this host for provisioning"
So I tried to uncheck it but it is still the same issue.

The checksum of these two modified files is different after patching them,
so that might be while modifications didn't take affect.
Maybe the good way would be to change this parameter into the source RPM
and build it by myself…

PS: just for info, selinux is in permissive mode.

··· Le jeudi 9 juin 2016 08:42:22 UTC+2, Nathanaël Blanchet a écrit : > > Hello, > > I meet this bug : http://projects.theforeman.org/issues/15223, and I want > to patch the application.js file, but I can't find it on the filesystem. > When browsing the /usr/share/foreman, I can't find the subdirectory > app/assets. All other ones are presents : > > drwxr-xr-x. 4 root root 4096 6 juin 18:21 controllers > drwxr-xr-x. 2 root root 4096 6 juin 18:17 helpers > drwxr-xr-x. 2 root root 98 6 juin 18:17 mailers > drwxr-xr-x. 15 root root 4096 6 juin 18:17 models > drwxr-xr-x. 2 root root 29 6 juin 18:17 observers > drwxr-xr-x. 14 root root 4096 6 juin 18:21 services > drwxr-xr-x. 2 root root 4096 6 juin 18:17 validators > drwxr-xr-x. 59 root root 4096 6 juin 18:21 views > > But my foreman seems to work as expected (except that bug), how is it > possible without this directory???? > > My foreman is 1.11.2 and I successfully migrated from katello 2.4 to 3.0 > RC8 (el7) > > Where can I patch this file? I tried to rsync the missing directory from > source, but it is the same issue. > > I saw that the patch will be merged into the 1.11.3 release, but I'd like > to understand what is happening there, just to be sure that my foreman > doesn't have too many missing files. > > Thank you for your help. >

Hello

in production setup, the application.js file is minimized and compressed. You
can find it at /usr/share/foreman/public/assets/

there are two files
application-$hash.js.gz
application-$hash.js

where $hash is some long fingeprint of the file. You'd have to patch these,
which might be not trivial.

Unfortunately I don't about better way.
Hope this helps a bit.

··· -- Marek

On Wednesday 08 of June 2016 23:32:39 Nathanaël Blanchet wrote:

Hello,

I meet this bug : Bug #15223: Resolving templates to provision a discovered host fails - Foreman, and I want
to patch the application.js file, but I can’t find it on the filesystem.
When browsing the /usr/share/foreman, I can’t find the subdirectory
app/assets. All other ones are presents :

drwxr-xr-x. 4 root root 4096 6 juin 18:21 controllers
drwxr-xr-x. 2 root root 4096 6 juin 18:17 helpers
drwxr-xr-x. 2 root root 98 6 juin 18:17 mailers
drwxr-xr-x. 15 root root 4096 6 juin 18:17 models
drwxr-xr-x. 2 root root 29 6 juin 18:17 observers
drwxr-xr-x. 14 root root 4096 6 juin 18:21 services
drwxr-xr-x. 2 root root 4096 6 juin 18:17 validators
drwxr-xr-x. 59 root root 4096 6 juin 18:21 views

But my foreman seems to work as expected (except that bug), how is it
possible without this directory???

My foreman is 1.11.2 and I successfully migrated from katello 2.4 to 3.0
RC8 (el7)

Where can I patch this file? I tried to rsync the missing directory from
source, but it is the same issue.

I saw that the patch will be merged into the 1.11.3 release, but I’d like
to understand what is happening there, just to be sure that my foreman
doesn’t have too many missing files.

Thank you for your help.

There might be some caching involved, try cleaning your browser cache.

Hope this helps

··· -- Marek

On Thursday 09 of June 2016 04:09:19 Nathanaël Blanchet wrote:

Thank you for your quick answer.
the concerning patch
Revision ad2ee956 - fixes #15223 - query parameters are now correct. before this patch, there we... - Foreman
611dcc2dcd6a1163b95a6e4e12b0394b3/diff/app/assets/javascripts/application.js
changes a “?” into a “&” character.
After doing this into the compressed and the minimized js file, I restarted
the httpd service, but the issue is the same:
"/hosts/template_used?id=209&provisioning=build"
According to the comment, the patch aims to delete the "provisionnig=buid"
query parameter
If I understand, this issue began with the appration of the checkbox "Build
mode Enable this host for provisioning"
So I tried to uncheck it but it is still the same issue.

The checksum of these two modified files is different after patching them,
so that might be while modifications didn’t take affect.
Maybe the good way would be to change this parameter into the source RPM
and build it by myself…

PS: just for info, selinux is in permissive mode.

Le jeudi 9 juin 2016 08:42:22 UTC+2, Nathanaël Blanchet a écrit :

Hello,

I meet this bug : Bug #15223: Resolving templates to provision a discovered host fails - Foreman, and I want
to patch the application.js file, but I can’t find it on the filesystem.
When browsing the /usr/share/foreman, I can’t find the subdirectory
app/assets. All other ones are presents :

drwxr-xr-x. 4 root root 4096 6 juin 18:21 controllers
drwxr-xr-x. 2 root root 4096 6 juin 18:17 helpers
drwxr-xr-x. 2 root root 98 6 juin 18:17 mailers
drwxr-xr-x. 15 root root 4096 6 juin 18:17 models
drwxr-xr-x. 2 root root 29 6 juin 18:17 observers
drwxr-xr-x. 14 root root 4096 6 juin 18:21 services
drwxr-xr-x. 2 root root 4096 6 juin 18:17 validators
drwxr-xr-x. 59 root root 4096 6 juin 18:21 views

But my foreman seems to work as expected (except that bug), how is it
possible without this directory???

My foreman is 1.11.2 and I successfully migrated from katello 2.4 to 3.0
RC8 (el7)

Where can I patch this file? I tried to rsync the missing directory from
source, but it is the same issue.

I saw that the patch will be merged into the 1.11.3 release, but I’d like
to understand what is happening there, just to be sure that my foreman
doesn’t have too many missing files.

Thank you for your help.

Finally, I think the bug has been resolved…
Before I couldn't resolve the provisionning template, and I couldn't build
the host for the same reason.
Now I still can't resolve the provisioning template, but the host
sucessfully builds!

··· Le jeudi 9 juin 2016 17:05:49 UTC+2, Marek Hulán a écrit : > > There might be some caching involved, try cleaning your browser cache. > > Hope this helps > > -- > Marek > > On Thursday 09 of June 2016 04:09:19 Nathanaël Blanchet wrote: > > Thank you for your quick answer. > > the concerning patch > > > http://projects.theforeman.org/projects/foreman/repository/revisions/ad2ee95 > > > 611dcc2dcd6a1163b95a6e4e12b0394b3/diff/app/assets/javascripts/application.js > > > changes a "?" into a "&" character. > > After doing this into the compressed and the minimized js file, I > restarted > > the httpd service, but the issue is the same: > > "/hosts/template_used?id=209&provisioning=build" > > According to the comment, the patch aims to delete the > "provisionnig=buid" > > query parameter > > If I understand, this issue began with the appration of the checkbox > "Build > > mode Enable this host for provisioning" > > So I tried to uncheck it but it is still the same issue. > > > > The checksum of these two modified files is different after patching > them, > > so that might be while modifications didn't take affect. > > Maybe the good way would be to change this parameter into the source RPM > > and build it by myself... > > > > PS: just for info, selinux is in permissive mode. > > > > Le jeudi 9 juin 2016 08:42:22 UTC+2, Nathanaël Blanchet a écrit : > > > Hello, > > > > > > I meet this bug : http://projects.theforeman.org/issues/15223, and I > want > > > to patch the application.js file, but I can't find it on the > filesystem. > > > When browsing the /usr/share/foreman, I can't find the subdirectory > > > app/assets. All other ones are presents : > > > > > > drwxr-xr-x. 4 root root 4096 6 juin 18:21 controllers > > > drwxr-xr-x. 2 root root 4096 6 juin 18:17 helpers > > > drwxr-xr-x. 2 root root 98 6 juin 18:17 mailers > > > drwxr-xr-x. 15 root root 4096 6 juin 18:17 models > > > drwxr-xr-x. 2 root root 29 6 juin 18:17 observers > > > drwxr-xr-x. 14 root root 4096 6 juin 18:21 services > > > drwxr-xr-x. 2 root root 4096 6 juin 18:17 validators > > > drwxr-xr-x. 59 root root 4096 6 juin 18:21 views > > > > > > But my foreman seems to work as expected (except that bug), how is it > > > possible without this directory???? > > > > > > My foreman is 1.11.2 and I successfully migrated from katello 2.4 to > 3.0 > > > RC8 (el7) > > > > > > Where can I patch this file? I tried to rsync the missing directory > from > > > source, but it is the same issue. > > > > > > I saw that the patch will be merged into the 1.11.3 release, but I'd > like > > > to understand what is happening there, just to be sure that my foreman > > > doesn't have too many missing files. > > > > > > Thank you for your help. > >