These are chat archives for spring-cloud/spring-cloud

18th
Nov 2015
Ryan Baxter
@ryanjbaxter
Nov 18 2015 00:09
this is the first time i have seen this though I wonder if adding the origin header is something new
Spencer Gibb
@spencergibb
Nov 18 2015 00:19
maybe something with boot 1.3?
checketts
@checketts
Nov 18 2015 00:41
@spencergibb I'm trying to use a local 'file://' repository with Config Server. When deploying it, we push a 'bare' git repo.
However in the JGitEnvironmentRepository it seems to be hard coded to look for a subdirectory or '.git'
(line 255)
A bare repo IS the .git directory (ie my-repo.git)
Is there support for bare repos elsewhere, or would you like a PR adding in bare repo support?
Dave Syer
@dsyer
Nov 18 2015 06:45
There is no support for bare repos. PR would be fine as long as it doesn't change the existing behaviour. Why is it such a problem to use a checked out repo though?
hacbq
@hacbq
Nov 18 2015 07:29

@dsyer . As I see in spring-cloud/spring-cloud-netflix#196. This bug fixed.
I have zuul config

zuul:
  ignoredServices: '*'
  routes:
    admin:
      path: /admin/**
      stripPrefix: true
      serviceId: admin

I want to add a "pages" service like, and I add before path "/admin/**

zuul:
  ignoredServices: '*'
  routes:
    pages:
      path: /admin/pages/**
      stripPrefix: true
      serviceId: pages
    admin:
      path: /admin/**
      stripPrefix: true
      serviceId: admin

And POST to "http://localhost:8765/refresh"
It seem zuul not reload routes.
And I test, change it into

zuul:
  ignoredServices: '*'
  routes:
    admin:
      path: /admin/**
      stripPrefix: true
      serviceId: admin
    pages:
      path: /bla/pages/**
      stripPrefix: true
      serviceId: pages

Amazing, it works. Please tell me why doesn't it work if I add it before first routes

Dave Syer
@dsyer
Nov 18 2015 11:16
So /admin/pages/foo doesn't work in the first case, but /bla/pages/foo does in the second case?
checketts
@checketts
Nov 18 2015 13:07
@dsyer Initially we went with normal checked out repo. We decided to rsync the repo up to our various config servers since those servers are in a network partition that can't reach our Git server. This caused problems because config server would then try to pull from origin/master (which it can't reach) and would hang until a network timeout would let it return. So we figured we could work around it by using bare repos since those don't have remotes. With those not being supported, we also could just delete the remotes in the normal repo and push that (I verified that works). So we can use a non-bare repo.
Another solution is if config server allows disabling the shouldPull logic in JGitEnvironmentRepository
gorelikov
@gorelikov
Nov 18 2015 14:07
Hello! I have received strange healthcheck answer: {..."hystrix":{"status": "DOWN","error": "java.lang.NullPointerException: null”}}
The main problem - i can’t repeat this localy. Any ideas about reasons of this strange answer?
Ryan Baxter
@ryanjbaxter
Nov 18 2015 17:49
@spencergibb regarding your suggestion yesterday to add a filter to remove the Origin header, should I be extending and using ZuulFilter to do that?
Spencer Gibb
@spencergibb
Nov 18 2015 19:22
@ryanjbaxter yes, and just create a bean. You’ll need the right type (“pre” probably).
Ryan Baxter
@ryanjbaxter
Nov 18 2015 19:26
ok thats what i am doing and it seems to work, just making sure :)
thanks
Spencer Gibb
@spencergibb
Nov 18 2015 19:26
NP