Closed tomkralidis closed 10 years ago
Tom, I would like to work on this, but I would like to know if I am understanding correctly. So, whenever we change the settings.SITEURL and run an updatelayers, the url field of any link django entities should reflect this? And the geoserver metadata links as well? And, similarly, if changing the settings.GEOSERVER_BASE_URL, should we also update the ows url field of maplayers entities? And what about the url in layer params field of maplayers entities?
@capooti yes, whenever settings.SITEURL
is updated, one should run python manage.py updatelayers
. When that runs, all links (https://github.com/GeoNode/geonode/blob/master/geonode/layers/models.py#L466) should be updated in the Django DB, then the metadata links should be updated in GeoServer config. Same with settings.GEOSERVER_BASE_URL
. Again, the only trigger here would on updatelayers, AFAIK.
I think that catches all cases.
@capooti when I try to change settings.GEOSERVER_BASE_URL
, paver start
trips with:
(venv)tkralidi@hoth:~/dev/geonode/geonode-stats$ paver start -b 0.0.0.0:8000 ---> pavement.start ---> pavement.start_geoserver your GEOSERVER_BASE_URL does not match http://localhost:8080/geoserver/
So I'm wondering whether settings.GEOSERVER_BASE_URL
should be messed with at all.
@tomkralidis, I put that there to ensure sanity until the jetty-runner part was able to deal with it (the code just hasn't been written). If anyone's chomping at the bit to run on a different port, try adding a '--port 1234' (if you're using 1234) option to pavement.py where it launches jetty-runner. sorry for being brief, gotta run
Downgrading from critical
This could be solved when we solve this one https://github.com/GeoNode/geonode/issues/809. Wanna close this?
This depends on a ticket we downgraded, so I am clearing the milestone too, however I still think this one is very important and can bite back third party applications like the geoserver-qgis-bridge and inasafe.
@capooti thoughts about this?
On the heels of #457,
updatelayers
should ensure that links in GeoServer's internal data configuration(s) are also updated.To reproduce:
ows:Metadata
valuessettings.SITEURL
ows:Metadata
valuesThe hostname should have been updated per
settings.SITEURL
.Note this fix must be applied to all resources GeoServer is housing in the context of GeoNode.