error while executing utils.run_client_script(host, args, use_sudo = True):
init
I m getting the error while the execution comes on this method and the execution stops here. I get error :- ' [sudo] password for user ' Also, after it a link is created between the pgbouncer.ini and temprory generated pgbouncer.ini.
Pls Help.
I'm unclear if you tested with use_sudo = False in your pg_staging.ini setup?
The sudo issue is solved. Now the problem is in link creation between pgbouncer.ini and temp pgbouncer.ini.
i 've done some modification in staging_client.sh.
#filename=basename $1
filename=$1
#mv $1 $PGBOUNCER_BASEDIR/$filename
#chmod a+r $PGBOUNCER_BASEDIR/$filename
chmod a+r $filename
U were moving the pgbouncer.temp.ini file to /etc/pgbouncer and then creating the link pgbouncer.ini -> pgbouncer.tmp.ini
now this pgbouncer.tmp.ini was not in /tmp folder. so the followin code in staging.py 567 line was giving error :
if self.host not in ("localhost", "127.0.0.1"): os.unlink(newconffile) as it was not able to find the newconffile on that location.
After my modifications in staging-client.sh it is able to find the newconffile there but still i think unlink is not working.
Could you run the unpatched pg_staging in debug mode and paste the output?
See, the thing is that soft link stuff is not working. U create a soft link between pgbouncer.ini and pgbouncer.tmp.ini and then when u unlink the tmp file, then the original pgbouncer.ini files gets lost. And the above mentioned changes in staging_client.sh are necessary.