asheesh changed the topic of #sandstorm to: Welcome to #sandstorm: home of all things sandstorm.io. Say hi! | Channel glossary: "i,i" means "I have no point, I just want to say". b == thumbs up. | Public logs at https://botbot.me/freenode/sandstorm/ & http://logbot.g0v.tw/channel/sandstorm/today
jadewang has quit [Remote host closed the connection]
<digitalcircuit> kentonv: regarding Groovebasin, it's not Sandstorm, it's Firefox Mobile/Android wake-locks. When a friend reported the issue, they didn't mention using their phone and I forgot to consider that option. Pardon the mild spam!
<asheesh> That's a fascinating problem, though.
<asheesh> I wonder if there's something apps on Sandstorm should be doing to play along nicely with that ecosystem.
<digitalcircuit> Firefox mobile -should- take a wake-lock when it's playing <audio>... I'll look for any bug reports there.
<asheesh> The depth of your knowledge makes discussing issue reports a pleasure, digitalcircuit.
<digitalcircuit> I don't think Sandstorm should always force keeping awake because most non-media apps shouldn't matter if they stop.
<asheesh> Yeah, that makes sense.
<digitalcircuit> Thank you, asheesh :)
wolcen has joined #sandstorm
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mnutt has joined #sandstorm
isd has joined #sandstorm
luluganeta has joined #sandstorm
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<digitalcircuit> I think it's a deliberate decision by Firefox in order to suspend <audio> tags for anything other than music, e.g. games or ambient audio: https://bugzilla.mozilla.org/show_bug.cgi?id=796333
<digitalcircuit> Groovebasin and co. may need to use the 'wakeLock' API whenever playing music, but it's not yet standardized or supported: https://boiler23.github.io/screen-wake/
<digitalcircuit> I'm not sure what role Sandstorm will have here - if frames are blocked from acquiring wakelocks, Sandstorm might need to accept a wakelock request from any running grain and perform the request via the top-level document. In either case, I should stop rambling about it in #sandstorm :)
TwoJames has quit [Ping timeout: 276 seconds]
TwoJames has joined #sandstorm
<XgF> digitalcircuit: uh, that appears to be a Firefox OS specific API, not supported on Fennec?
<asheesh> digitalcircuit: I like your rambling fwiw.
xet7 has quit [Quit: Leaving]
xet7 has joined #sandstorm
isd has quit [Quit: Leaving.]
|jemc| has joined #sandstorm
mnutt has joined #sandstorm
<asheesh> Sympathies to all who work in GitHub ops about the current outage.
luluganeta has quit [Ping timeout: 240 seconds]
<XgF> (slightly less sympathies from this corner for only having one data center :P)
frigginglorious has joined #sandstorm
<asheesh> Howdy frigginglorious
<asheesh> I'm about to get on a bus but I will be back later!
<frigginglorious> asheesh: hello sir :)
<frigginglorious> I will be lurking
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
frigginglorious has quit [Ping timeout: 240 seconds]
mnutt has joined #sandstorm
luluganeta has joined #sandstorm
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<digitalcircuit> XgF: I think requestWakeLock was Firefox OS-specific, while wakeLock appears as though it'll be for any browser.
rob1 has joined #sandstorm
dwrensha has joined #sandstorm
jadewang has joined #sandstorm
frigginglorious has joined #sandstorm
<digitalcircuit> Manual wake-lock on Android works around that. Unfortunately, now both mobile and desktop playback on Groovebasin sometimes stop, but I think it may be something amiss within the spk.
<digitalcircuit> In the logs, "sandstorm/sandstorm-http-bridge.c++:433: error: exception = sandstorm/sandstorm-http-bridge.c++:420: failed: Failed to parse HTTP response from sandboxed app.; error = stream ended at an unexpected time, stack: 0x4cd2c0 0x469922" I'd check the code if Github wasn't down.
<digitalcircuit> Also, "web socket error: Error: write EPIPE at errnoException (net.js:904:11) at Object.afterWrite (net.js:720:19)" I'll keep experimenting, meanwhile.
frigginglorious has quit [Remote host closed the connection]
rob1 has quit [Ping timeout: 250 seconds]
jadewang has quit [Remote host closed the connection]
<digitalcircuit> Err, pardon, ignore the web socket error - happens when Android drops connection. However, the earlier Sandstorm HTTP bridge exception happened for both mobile and desktop, interrupting playback.
luluganeta has quit [Ping timeout: 265 seconds]
frigginglorious has joined #sandstorm
mnutt has joined #sandstorm
simonv3 has quit [Quit: Connection closed for inactivity]
frigginglorious has quit [Quit: frigginglorious]
frigginglorious has joined #sandstorm
mcpherri1 has joined #sandstorm
mcpherrinm_web has joined #sandstorm
<mcpherrinm_web> The sandstorm meetup today was nice! Thanks for organizing and helping me :)
<asheesh> (-: nice to see you!
|jemc| has quit [Ping timeout: 240 seconds]
mcpherrinm_web has quit [Ping timeout: 252 seconds]
frigginglorious has quit [Quit: frigginglorious]
frigginglorious has joined #sandstorm
|jemc| has joined #sandstorm
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
|jemc| has quit [Ping timeout: 240 seconds]
nicolagreco has quit [Remote host closed the connection]
TwoJames2 has joined #sandstorm
TwoJames has quit [Read error: Connection reset by peer]
paroneayea has quit [Read error: Connection reset by peer]
paroneayea has joined #sandstorm
ecloud is now known as ecloud_wfh
synchrone has joined #sandstorm
synchrone has quit [Quit: Leaving.]
synchrone has joined #sandstorm
synchrone has quit [Quit: Leaving.]
synchrone has joined #sandstorm
synchrone has quit [Quit: Leaving.]
synchrone has joined #sandstorm
blutux has joined #sandstorm
blutux has quit [Client Quit]
paroneayea has quit [Read error: Connection reset by peer]
<ckocagil> oh boy this new Gogs version is amazing
<ckocagil> mad props to the upstream authors
paroneayea has joined #sandstorm
luluganeta has joined #sandstorm
luluganeta has quit [Ping timeout: 256 seconds]
rustyrazorblade has quit [Quit: rustyrazorblade]
frigginglorious has quit [Ping timeout: 260 seconds]
blutux has joined #sandstorm
blutux has quit [Client Quit]
frigginglorious has joined #sandstorm
jon1012 has joined #sandstorm
<xet7> ckogagil: Are you talking about Gogs official version, or the Sandtorm port? And what feature?
tobald has joined #sandstorm
<xet7> ckocagil i mean
<xet7> ckocagil: Are you planning to update your Sandstorm port?
<ckocagil> xet7: I'm currently updating it
<ckocagil> xet7: the design is much better and consistent. I like it.
<xet7> ckocagil: Thanks a lot :)
<xet7> ckocagil: I will continue my Finnish translation of Gogs when I have free time for it.
<xet7> ckocagil: What is involved in porting Go software to Sandtorm?
<xet7> ckocagil: How do you do it?
<ckocagil> xet7: you implement auto logins and stuff. remove features and UI that don't make sense in sandstorm.
<ckocagil> I found it much more pleasant to port apps written in Go instead of a dynamically typed language e.g. Node.js
<xet7> ckocagil: Could you write some kind of porting guide for Go apps? If there is not such guide yet?
<xet7> s/guide/docs
<ckocagil> xet7: I might write a general porting guide. I can't think of anything to say that is specific to Go
<xet7> ckocagil: Ok thanks :)
<xet7> ckocagil: How much of the porting is in current Sandstorm docs, and how much missing from there?
<ckocagil> xet7: the docs are pretty good, but I would find a step-by-step guide with a checklist much more practical
<ckocagil> which is what I want to write
<xet7> ckocagil: Could that step-by-step guide be included to sandstorm docs directly? You could submit pull request?
<ckocagil> xet7: that's up to asheesh and folks to decide :-)
<xet7> ckocagil: asheesh etc have been very friendly and accepting of my contributions to website etc :)
<xet7> ckocagil: Gogs author Unkwon thanks you for porting new version of Gogs to Sandstorm, they're chat channel is at https://gitter.im/gogits/gogs
fonfon has joined #sandstorm
mnutt has joined #sandstorm
* asheesh waves
joshbuddy has quit [Quit: joshbuddy]
jon1012 has quit [Ping timeout: 260 seconds]
<synchrone> hey guys
<synchrone> so as I mentioned at a meetup in Berlin yesterday, there's some work going on about calendars+contacts
<synchrone> and right now sandstorm's nodejs seems to ...erm... http://pastebin.com/aSjdxbKK
* asheesh waves
<asheesh> Hi synchrone , nice to see you again
<asheesh> Wow, that is quite an error.
<asheesh> I can't tell if this is coming from Sandstorm or if it's coming from the app.
<synchrone> well the app is nginx+uwsgi+python
<synchrone> the stacktrace looks like node.js
<asheesh> Gotcha, so that makes that easier (-:
<dwrensha> the error is coming from Sandstorm's proxy.js
<asheesh> It looks to me like we think there's an ETag header but there isn't.
<asheesh> Trying to see why we would think that, and what the value of that header is.
<asheesh> You could probably add a one line local hack for development: Edit /opt/sandstorm/latest/programs/server/app/server/proxy.js
<asheesh> if (!match) { console.log("Found weird ETag input", input); continue; }
<asheesh> Then sudo service sandstorm restart
<asheesh> If you do that, then the Sandstorm /opt/sandstorm/var/log/sandstorm.log will log the weird ETag value and that'll give me some further clues, as well as make it not blow up.
<dwrensha> looks like the "If-None-Match: *" thing might be responsible
<asheesh> const noneMatches = parseETagList(request.headers['if-none-match']);
<asheesh> Right, OK, so '*' is an invalid ETag.
<asheesh> dwrensha++
<synchrone> hmm... i'm not sure we have the same code version
<asheesh> synchrone: The code I pasted is what you'd change line #1947 to, fwiw, since yours probably starts with if (!match)
<asheesh> I can post an actual diff (-:
<asheesh> But I think dwrensha has figured out what I wanted to figure out with that.
NwS has joined #sandstorm
<synchrone> err... there seem to be real line numbers as comments
<synchrone> and the actual lines are shifted
<asheesh> Oh, never mind, I'm using a debug build possibly.
<asheesh> Made via 'make fast'. I don't know if that turns off minification or what.
<asheesh> I guess I'll go read the HTTP/webdav spec for what if-none-match really means.
<synchrone> if-non-match is not from webdav spec, i think
<synchrone> it's plain http conditional get
<phildini> hey when I try to upgrade a python package in my app I get this: https://gist.github.com/phildini/246146fed4d8d40779cf
<synchrone> or maybe webdav redefines that...
<asheesh> "As a special case, the value "*" matches any current entity of the resource.
<asheesh> "
<asheesh> So presumably we should be handling this, not crashing.
jon1012 has joined #sandstorm
jon1012 has joined #sandstorm
<dwrensha> looks like we should accept that asterisk
<synchrone> ok, how do I restart sandstorm daemon?
<asheesh> sudo service sandstorm restart
<asheesh> Within the 'vagrant-spk ssh' if you're using vagrant-spk
simonv3 has joined #sandstorm
<asheesh> (FWIW debugged with phildini via private message)
<dwrensha> and looks like we do handle the "*" in the 'if-match' case
<asheesh> Oh, yeah, so we do.
<synchrone> oh great
<synchrone> 10494 sandsto+ 20 0 839820 121900 13388 R 101.1 6.2 1:17.14 /bin/node sandstorm-main.js
<synchrone> 101% CPU
<asheesh> Zing
<synchrone> so that patch was fast, but dangerous ^)
<synchrone> triggered an endless loop on my request
<asheesh> Oops.
<asheesh> synchrone: OK so I should probably help you undo that patch?
<asheesh> if (!match) throw new Meteor.Error(400, 'invalid etag');
<synchrone> well i still have the initial line
<asheesh> I think the thing to do right now is for us fix this thoughtfully in the next few days.
<asheesh> In any kind of workaround we're probably going to end up mangling the header, so a workaround is probably not super useful anyway.
<synchrone> thanks guys :) super helpful </nosarcasm>
<synchrone> i'll hack it somehow in the meantime
<asheesh> OK, cool. If you can avoid sending that header that triggers the bug, then you can live a happy life for now.
<synchrone> okay, another question: my app uses heavy clientside resource caching, which is bound to a domain
<synchrone> how do i prevent it from re-caching everything each time I open the app again (and sandstorm generates new subdomain name)
<asheesh> At the moment, the resource caching is going to expire whenever the user clicks "Reload" in their browser.
<asheesh> We're working on an API that lets apps specify files to be available as static resources.
<asheesh> Unfortunately we don't have that ready yet.
<asheesh> In this case when I say "working on" I mean "we have imagined it but we haven't started implementing it yet".
<synchrone> naturally, the dev capacity is limited
<synchrone> it's ok, i'll probably resort to backend resource bundling
<asheesh> Cool, thanks for being understanding.
<asheesh> What's this app, btw?
<asheesh> Oh wow! : D
<synchrone> i'm not sure how exactly should that function though
<synchrone> calendar and contacts as separate grains or all together
<asheesh> The standard Sandstorm-y way to think about this is one calendar per grain. Not one calendar event, but one calendar.
<asheesh> And then there would be a way to connect them to each other.
<synchrone> yup
<synchrone> the app is the same though
<synchrone> can I expose 2 "grain types" from the same app?
<asheesh> You can; see framadate which has a generic poll and an event scheduling poll.
<synchrone> ok
<asheesh> I personally don't love the UX that comes out of this, so I would probably create two packages instead. But I haven't thought about it a great deal yet.
rustyrazorblade has joined #sandstorm
<synchrone> I think the ux ok
<asheesh> Great (-:
<synchrone> the UI can use some love, but the concept of exposing different commands from the app seems natural
<mnutt> asheesh: synchrone: I'm pretty sure I wrote that etag code and can take a look sometime this week if it hasn't been identified by then
notevil has joined #sandstorm
|jemc| has joined #sandstorm
<asheesh> Cool; just tagged you on the issue.
<asheesh> Also InfCloud sure does look nice.
<phildini> is there a "neverInclude" to match "alwaysInclude" in the pkgdef?
<asheesh> iirc excludePaths
<asheesh> googlin
<asheesh> hidePaths
<asheesh> That usually does the trick.
<phildini> cool, thanks.
jon1012 has quit [Ping timeout: 240 seconds]
<asheesh> bd
fonfon has quit [Remote host closed the connection]
tobald has quit [Quit: Ex-Chat]
kravec has joined #sandstorm
<kravec> Hello everyone. I'm triing to install Sandstorm on a shared hosting (one.com). In puppy i have an error at the execution of the command, [Your kernel does not appear to be compiled with support for unprivileged user
<kravec> namespaces (CONFIG_USER_NS=y),] , can someone help me please? ty
<asheesh> Hi kravec
<kravec> hi asheesh :)
<asheesh> It seems that your Linux kernel doesn't support Sandstorm, and that it is modified by your VPS/VM vendor to not support it. There's a Linux feature that Sandstorm reilies on that is someitmes disabled.
<asheesh> Some people have noticed that if they choose the "official Debian kernel" or "official Ubuntu kernel" in an admin interface somewhere, they can amke
<asheesh> make things work on other providers.
<kravec> okay thanks, i will check on the admin
<asheesh> Great. Keep us posted.
<kravec> i don't think i can change that, the provider is a really simple one i can't configure a lot a thinks but i will check
<kravec> they don't even say the specifications of the serveur, i will try on another one. Thanks for your answer anyways! :)
<asheesh> You are welcome! Best of luck and let us know when you get your issues resolved.
blutux has joined #sandstorm
<kravec> ty, i will! by by
kravec has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<frigginglorious> So, I really just started looking into inner-workings of Sandstorm. Capn Proto is used to pass data from the grain to Sandstorm. So, is there an easy built-in functionality to share data between grains?
<frigginglorious> For example, implementing somethign that would save an etherpad document grain into a page on a mediawiki grain?
<asheesh> Howdy frigginglorious
<asheesh> You are going to enjoy the Powerbox talk that zarvox gave last night, of which there is a recording, but which is not yet online.
blutux has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<asheesh> But the idea is yes - Sandstorm will support a chooser interface where one grain can request the ability to access another grain, which results in a chooser interface, which results in the permission being granted.
<frigginglorious> asheesh: really, does that talk go over this chooser interface?
<asheesh> Yes!
<asheesh> The chooser interface is called (for technical/historical reasons) the Powerbox.
<phildini> what does it mean in terms of sandstorm headers (sandstorm-bridge?) if a user is anonymous? I think the django-sandstorm middleware freaks out in this case, and I want to try and catch it.
<asheesh> If user is anonymous the header is empty.
<phildini> interesting.
<asheesh> I used to think "oh no that would be super confusing for apps" but then I realized if the request is *unauthorized* the app won't even get the request.
<asheesh> So maybe that means it's merely confusing for the app authors, just not the app code : P
blutux has joined #sandstorm
<asheesh> frigginglorious: It's a lot to go into, so give us about a day or two and the talk will hopefully be online and that will answer many of your questions.
<asheesh> But if you want a headstart, frigginglorious, check out http://www.combex.com/tech/edesk.html
<asheesh> Semi-warning: the website is full of snark.
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asheesh> http://plash.beasts.org/powerbox.html is external documentation on what a powerbox is
<frigginglorious> asheesh: I figured it would be complicated :P
<asheesh> The crux of it, anyway, is that each app can declare which Cap'n Proto "interface"s they can "offer", and any app can then go request any Cap'n Proto "interface".
<frigginglorious> I was helping a buddy work on a simple, gravatar-like, super efficient, API for getting and setting values in a redis database with JSON objects. Something like that would be amazing for Sandstorm.
<asheesh> Tell me more about why you're excited about it!
blutux has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mnutt has joined #sandstorm
frigginglorious has quit [Quit: frigginglorious]
wolcen has quit [Ping timeout: 260 seconds]
blutux has joined #sandstorm
xet7 has quit [Quit: Leaving]
frigginglorious has joined #sandstorm
joshbuddy has joined #sandstorm
blutux has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
blutux has joined #sandstorm
synchrone has quit [Ping timeout: 256 seconds]
NwS has quit [Quit: See you in Isla de Muerte!]
<frigginglorious> asheesh: because the internet is a weird place; being able to have a controlled environment like this is a necessity.
<frigginglorious> also, I didn’t believe something like this could be so easy to install on a VM… truly incredible.
<asheesh> (-:
<au> asheesh: sandstorm discussion with blaise & live demo went well \o/ https://www.youtube.com/watch?v=3YrN3rv45TE&t=7h10m00s
<au> (added to wiki)
<asheesh> Yeah! BTW I think you're responsible for us becoming famous in France.
<au> yes.
<asheesh> For which I cannot thank you enough.
<au> :D it's an idea worth spreading!
<asheesh> : D
<frigginglorious> au: I feel like I’ve heard that before.
<au> indeed? it was yesterday
<asheesh> Unless you mean "ideas worth spreading" which is the TED motto.
<frigginglorious> haha, no the “Ideas worth spreading” :P
<au> yeah but we did it the inverse-TEDx way
<au> instead of a huge screen with people inside it
<au> we have a laptop we hold ourselves
<au> metaphoric of Sandstorm
<asheesh> Literally lol-ing here in appreciation of your metaphor.
<kentonv> asheesh, frigginglorious: Our new site actually has a section describing the powerbox, so we don't need to rely on Plash's page anymore. https://sandstorm.io/how-it-works#powerbox
<asheesh> Oh! Great!
<asheesh> This web page is more like a book than a web page.
<asheesh> Which is OK I suppose!
jparyani_ is now known as jparyani
jparyani is now known as jparyani_
jadewang has joined #sandstorm
jparyani_ is now known as jparyani
wolcen has joined #sandstorm
blutux has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<mrdomino> asheesh: let's say i want a simple webapp that will just show me a raw dump of all messages it gets to its configured email address
<mrdomino> (obviously this is for trying to figure out the smtp stuff)
<mrdomino> how would i get something like that?
<asheesh> mrdomino: i,i the roundcube grain
<asheesh> I should say a roundcube grain
<mrdomino> ok it prints out everything you send to the smtp interface?
<mrdomino> because i have thus far not seen anything come in on it
<asheesh> Oh, maybe I misunderstood. I guess roundcube listens on the publicId@hostname email address, and then stores those in a mailbox.
<mrdomino> yeah, that's a reasonable model. and given that model, the smtp pipe is broken somewhere before the sandstorm part of it
<mrdomino> (assuming sandstorm itself is fine, which i mean, it doesn't often randomly break in my experience)
<mrdomino> (and btw that's a high compliment, great job)
<asheesh> (-:
<asheesh> To make sure I understand what you're experiencing, you have a situation where you can type something into a e.g. roundcube grain, click send, but then mail never leaves the grain?
<asheesh> Or is instead that a mail never reaches the grain?
<asheesh> ...you know, I think sandstorm-smtp-bridge "just" creates files in /var/mail
<asheesh> Let me go check.
<mrdomino> mail leaves the grain, but never reaches it
<mrdomino> i get mail from roundcube in my gmail inbox, but if i send email directly to the capability addr from gmail, it doesn't show up in roundcube
<asheesh> Receiving
<asheesh> In this case, receipt of e-mails is already handled for you. Upon your grain receiving an e-mail, it will be written to /var/mail/new. This follows the maildir convention, and many e-mail apps will be able to use this out of the box.
<asheesh> That's what the docs say. Let me find out what makes that true.
<asheesh> But if that's true, then a grain backup should work for you.
<asheesh> FWIW:
<asheesh> ➜ ~ telnet aspmx.l.google.com 25
<asheesh> Trying 74.125.28.27...
<asheesh> Connected to aspmx.l.google.com.
<asheesh> ➜ ~ telnet mrdomino.sandcats.io 25
<asheesh> Trying 159.203.3.62...
<asheesh> telnet: Unable to connect to remote host: Connection refused
<asheesh> So that might be your issue.
<asheesh> Maybe you know about that though and it's separate.
<mrdomino> yeah just fixed that one
<mrdomino> turns out nginx-light is not the package you want on ubuntu for an smtp reverse proxy
<mrdomino> holy smokes it works
<mrdomino> (the answer is nginx-core, btw)
<mrdomino> it's embarrassing that i got this far into the debugging process before actually trying a telnet localhost 25
<asheesh> (-:
<mrdomino> too much faith in nginx i suppose :-p
<asheesh> In conclusion, we should fix Sandstorm so it binds the port for you.
<mrdomino> lol
<mrdomino> yes
<zarvox> and then we should also support running DNS, and then bind port 53
<mrdomino> well i mean, the endgame is all packets of every kind, right?
<zarvox> Anything that makes users' life better :)
<zarvox> It would be pretty awesome to just have an NS record point at the Sandstorm server, and then a driver or something handles hostnames, and this integrates with the static publishing and wildcard DNS requirements neatly
raoulzecat has joined #sandstorm
jon1012 has joined #sandstorm
<jon1012> local.sandstorm.io isn't known
<jon1012> should I add something to my dns resolver ?
<kentonv> jon1012: no, it should map to 127.0.0.1
<jon1012> it doesn't
<kentonv> is it possible your DNS server is configured to block things from mapping to local/internal addresses?
<jon1012> and http://localhost:6080 return a message beginning with "Error looking up DNS TXT records for host "localhost": queryTxt ENOTFOUND"
<jon1012> uh I don't know
<kentonv> are you on a corporate network?
<jon1012> nope
<jon1012> I'm at home
<kentonv> what ISP?
<dwrensha> that error might be because your BASE_URL is wrong
<jon1012> ISP is bouygues telecom in france
<kentonv> dwrensha: that doesn't explain local.sandstorm.io not resolving
<jon1012> nameserver goes to the isp box
<jon1012> but I can try to change it
<kentonv> jon1012: so if you "ping local.sandstorm.io", it doesn't work?
<jon1012> ping: unknown host local.sandstorm.io
<kentonv> weird
<jon1012> I'll try to change my dns
<kentonv> my best guess is your ISP feels hostnames that bind to localhost are suspicious and blocks them
<kentonv> there is another option though
<jon1012> ok
<jon1012> you're right, I changed my dns to google dns and it works now
<kentonv> if you edit /opt/sandstorm/sandstorm.conf, you can change BASE_URL to "http://localhost:6080" and WILDCARD_HOST to "*.localhost:6080"
<jon1012> I'll set up my router to use google's dns by default instead of my isp ones
<kentonv> *most* (but not all) browsers will resolve *.localhost to 127.0.0.1
<kentonv> so if *.localhost works on your machine that's actually a better bet, since then you don't rely on funny DNS. :)
<kentonv> (gtg, meeting)
frigginglorious_ has joined #sandstorm
frigginglorious has quit [Ping timeout: 240 seconds]
frigginglorious_ is now known as frigginglorious
frigginglorious has quit [Ping timeout: 276 seconds]
frigginglorious has joined #sandstorm
<zarvox> argh I can't make children of a flexbox efficiently grow up to some parent's max-height and then overflow https://jsfiddle.net/ubL7p19h/2/
<zarvox> I want that content to be contained within the green outer div, without having to manually specify a height for the inner div
jinnko has quit [Ping timeout: 240 seconds]
<jon1012> when I try to make a vagrant-spk up after a vagrant-spk destroy, I get this error while the vm is starting (recreating I guess) :
<jon1012> and then my app don't work because of a lot of weird error
<jon1012> should I run some step before doing the up after a destroy ?
<zarvox> jon1012: possibly your bash script setup.sh is invalid bash?
<jon1012> (I wanted to remove my app to reinstall it, so I called destroy, which wasn't the good command I guess)
<jon1012> oh
<zarvox> or rather, has a bug?
<jon1012> it calls my script in there ?
<zarvox> "vagrant-spk up" runs setup.sh
<jon1012> ohh
<jon1012> didn't know
<zarvox> "vagrant-spk dev" runs build.sh
<jon1012> I thought dev did that
<jon1012> ok
<zarvox> and then launching a grain runs launcher.sh in the sandbox
<zarvox> so double-check your quotes in setup.sh, I'd say :)
<jon1012> I used the default setup.sh from the tutorial and just changed the text in the nginx conf
<jon1012> can I just copy a file on that nginx config instead of including int in the setup.sh ?
<jon1012> (looks like bash doesn't like the regexp in the inline cat stuff)
notevil has quit [Quit: Leaving]
<zarvox> yeah, you could totally do that
<zarvox> so you could create a file in the .sandstorm folder, say, `sandstorm-php` with the appropriate content, and then just copy /opt/sandstorm/.sandstorm/sandstorm-php or symlink it into /etc/nginx/sites-available from setup.sh
<zarvox> alternately, you could write a whole nginx.conf and invoke nginx with the -c flag
<jon1012> thanks :)
<jon1012> I'll try
<zarvox> Dang, I used the word "just". I'm not supposed to do that.
<zarvox> :P
<jon1012> didn't know .sandstorm was transfered to /opt/sandstorm/.sandstorm
<zarvox> oops, /opt/app/sandstorm
<zarvox> err
<jon1012> by the way, is there any of you guys comoing to fosdem this week end ?
<zarvox> /opt/app/.sandstorm
<jon1012> I'll be there
<zarvox> awesome! I don't think we have anyone going to fosdem, but it certainly sounds like there'd be folks interested in Sandstorm there!
<zarvox> mnutt: neato!
<zarvox> mnutt: so this is a library that lets you mount a Parse connector somewhere within another app's route hierarchy?
<mnutt> I think you can mount it in your app or run it separately. it would be great if this, running on sandstorm, could _be_ your backend entirely for a lot of apps
<zarvox> Ahhh, and this could expose itself via a powerbox offer of some "Parse API" interface, and once we have apps that create grains from offers, then you could launch new app instances already-connected to the backend
<jon1012> what script is run when you create a grain exactly ?
<jon1012> (where I should inject the setup sql code etc)
<zarvox> just launcher.sh, inside the sandbox
<jon1012> ok
<zarvox> launcher.sh
<jon1012> launcher.sh is not called when you restar the grain ?
<zarvox> you start out with a completely empty /var
<zarvox> launcher.sh is called when you restart the grain by default
<jon1012> ok
<jon1012> when I make changes to my .sandstorm, I have to destroy and recreate the vagrant vm each time ?
<zarvox> specifically, the sandstorm-pkgdef.capnp specifies the action to run or the continueCommand
<jon1012> or is there a simpler way ?
<zarvox> depends on what you're changing
<zarvox> if it's something that fiddles with global VM state, then you're probably best off destroying/recreating, to be sure
<jon1012> changing files in the php app for example
<zarvox> if you're just changing launcher.sh, you just have to delete that grain and create a new one
<jon1012> or the launcher.sh
<jon1012> ok
<zarvox> changing files in the php app should need just a page refresh
<jon1012> oh
<jon1012> ok
<jon1012> and permissions on the folders ?
<zarvox> changing launcher.sh will need stopping and starting the grain (and you probably just want a fresh grain with a fresh /var, so delete/new grain)
<zarvox> which folders? :)
<jon1012> app/data
<jon1012> the app needs to be able to change its data folder
<zarvox> is that under /var/ in the sandbox?
<zarvox> or under the app's source code on the host?
<jon1012> under the app source
<jon1012> ok understood, ain't gonna happen :)
<jon1012> I have to find a way to move that to /var
<zarvox> the usual suggestion here is to make a dangling symlink from <source code folder>/data -> /var/data
<zarvox> and then mkdir -p /var/data in launcher.sh
<zarvox> (to be clear: creating the dangling symlink is something you do on the host as a code change to the repo, rather than in any of the scripts)
<jon1012> ok
<jon1012> or I could copy the app/data to /var/data in launcher.sh
<jon1012> and change the code to include the files from /var/data instead
<zarvox> oh! Yeah, that would work well too. Is this mutable data, or immutable data?
<jon1012> I guess ints mutable as the script raise an error if those aren't writable by the app
<zarvox> If the application lets you configure its data directory, you almost certainly want to do that rather than the symlink hack.
<jon1012> they have a DATA_PATH in constants.php
<jon1012> and use this everywhere
<zarvox> oh, that sounds great. set that to /var/data, and in launcher.sh, if the folder and the default data don't exist, copy them in from /opt/app/data.
gambatte has quit [Ping timeout: 264 seconds]
<jon1012> yup that's what I did
jon1012 has quit [Remote host closed the connection]
<asheesh> Whoa, the end of Parse.
<asheesh> I didn't realize mnutt that http://blog.parse.com/announcements/moving-on/ is the context for your link of the parse-compatible service.
<chilts> that's pretty sad it's gone (even though I didn't use it)
<chilts> great companies getting swallowed by bigger ones, only to shut them down - it's all too familiar
gambatte has joined #sandstorm
jon1012 has joined #sandstorm
<jon1012> back
<jon1012> by the way, is there any mean to see the php logs in the vm ?
<jon1012> (of the grain)
<jon1012> to see what is the error that got trigerred
<asheesh> jon1012: Yes - the "view grain log" button in the top black bar
<jon1012> yup, but I don't see php errors there
<asheesh> PHP errors should be in there, but the app might disable PHP error reporting.
<asheesh> error_reporting(-1);
<asheesh> should turn on all errors
<asheesh> Note that I might be wrong and the errors might not get reported in the grain log, but I *think* they do anyway.
mnutt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wolcen has quit [Ping timeout: 260 seconds]
<jon1012> ok, another question, what is the good way to get acces to an app to the mysql preinstalled ?
<jon1012> should the app connect as root ?
<asheesh> MySQL is already pre-installed in the lemp stack; see https://docs.sandstorm.io/en/latest/vagrant-spk/services/
<asheesh> I see now what you're asking.
<asheesh> Connecting as root is OK; if that makes you feel weird, there's an alternative in the doc listed.
<jon1012> that's not a problem
<asheesh> Cool.
<jon1012> but I get an erro about lack of password in php
<jon1012> Access to database is denied for `root` (`mysql:host=localhost;dbname=freshrss;charset=utf8`)
<asheesh> Did you create the database first? You do need to do that, fwiw.
<jon1012> oh :)
xet7 has joined #sandstorm
<asheesh> (-:
kentonv has quit [Ping timeout: 256 seconds]
jadewang_ has joined #sandstorm
<jon1012> thanks
jadewang has quit [Ping timeout: 272 seconds]
<asheesh> Yo gotcha jon1012
<asheesh> s/Yo /You /
kentonv has joined #sandstorm
<jon1012> soo
<jon1012> how is the user passed to the app ?
<jon1012> in what var exactly ?
<asheesh> "the user"?
<asheesh> Which user? You mean the MySQL username?
<jon1012> no, the actual user from the web
<jon1012> ok
<jon1012> thanks
<asheesh> (-:
raoulzecat has quit [Quit: byebye]
<jon1012> is there a way I could get the X-Sandstorm-Username as a $remote_user in nginx ?
<jon1012> (so I can pass it to fastcgi)
<asheesh> FWIW this is the user's human name, so it's not permanent; the user could change this over time.
<kentonv> also two users can choose the same name
<kentonv> X-Sandstorm-User-Id is the unique identifier
<jon1012> ok
<jon1012> then X-Sandstorm-User-Id
<asheesh> One sec let me see!
<asheesh> fastcgi_param REMOTE_USER $remote_user;
<asheesh> would *almost* work
<jon1012> that's what I guessed, but is it set that way by sandstorm ?
<kentonv> I think the question is how to initialize remote_user from X-Sandstorm-User-Id
<zarvox> no, but you can modify the nginx confs if you like
<asheesh> Exactly, yeah; it's the last item, $remote_user that you'd have to change.
<asheesh> You could try
<asheesh> fastcgi_param REMOTE_USER $http_x_sandstorm_user_id;
<asheesh> Untested, but _should_ work based on skimming other nginx.conf files, specifically https://www.nginx.com/resources/wiki/start/topics/examples/full/
<asheesh> Honestly not sure.
<jon1012> ok :)
<jon1012> and in launcher.sh is there a way to get that x_sandstorm_user_id for the owner of the grain ?
<jon1012> (to set it as an admin)
<jon1012> sorry for all those questions
<asheesh> There isn't, except that (if I recall correctly) the owner of the grain has all permission bits set to true, so you could trust x-sandstorm-permissions instead if you add an "admin" permission to the app in the sandstorm-pkgdef.capnp and then you could trust x-sandstorm-permissions.
frigginglorious has quit [Ping timeout: 256 seconds]
<jon1012> ok
<asheesh> jon1012: You can also write the user ID that owns the grain to /var somewhere, or to the database, when the first request is made.
<zarvox> strictly speaking, there's no guarantee that the first request comes from the owning userid, though it's probably true
<asheesh> I was thinking that, yeah.
<zarvox> I would suggest the "define a permission that you don't grant to any of the roles" approach
<zarvox> the owner will have that permission
<asheesh> i,i in which case, shouldn't we "just" do this in the default generated sandstorm-pkgdef.capnp?
<asheesh> (yes people could always change it; it's OK if they change it, but the defaults could be more helpful)
<zarvox> Well, we can't do that without a SandstormApi break
<zarvox> or rather, we can't provide this in any way other than the default generated thing
<asheesh> Oh, I was thinking that vagrant-spk could autogenerate a sandstorm-pkgdef.capnp with some fields & roles.
<asheesh> Right, yeah.
<asheesh> AFK a bit anyway
<zarvox> I guess we could do that, though I worry it might confuse people and be complicated
<zarvox> but yeah, +0 at least
frigginglorious has joined #sandstorm
<jon1012> mmh
<jon1012> first version, barely working
<jon1012> got to go, time to sleep :)
<jon1012> thanks for your help guys
<asheesh> Amazing!
<jon1012> (still a lot of problem by the way)
<jon1012> (on auth mainly)
<jon1012> (and I'll have to handle the cron jobs too)
jon1012 has quit [Quit: Ex-Chat]
frigginglorious has quit [Quit: frigginglorious]
<asheesh> Oh, the cron jobs!
<asheesh> (in the style of: "Oh, the humanity!")
synchrone has joined #sandstorm
<phildini> I realize it semi-breaks some of the sandstorm model to have cron, but boy would that be nice.
<phildini> I would even be willing to redefine the cron tasks in capnp if I had to.