Commit Graph

4311 Commits

Author SHA1 Message Date
JT Olio
a974db7eec Update automatic updater blueprint to catch missing requirement
from https://github.com/storj/storj/pull/2677#pullrequestreview-270882629

this bit evidently never made it in.

See:
  https://review.dev.storj.io/c/storj/private/+/2053
  https://review.dev.storj.io/c/storj/storj/+/2054

Change-Id: Ie1435867cefa6d7e8b9f71bca13e24a161a619ae
2020-06-05 16:24:23 -06:00
Egon Elbre
36c461bd59 private/tagsql: track proper closing of rows and statements
This ensures that rows are closed to avoid leaks.
Also verifies that Err() is called, to ensure that no
error is left behind.

Change-Id: Idd1bec9bf479f40021da67b2c80ce83033149469
2020-06-05 18:25:43 +00:00
Yingrong Zhao
c78f88beb6 scripts/tests: use the same version for storj-sim as satellites
Change-Id: If85b14a0a5af334b9547d73bc4dbe65cdd856984
2020-06-05 13:17:17 -04:00
Jeff Wendling
943eb872d3 satellite/audit: depend less on details of some error message
the error message changed when we removed spacemonkeygo/errors

Change-Id: I4904a072cfd84e4c39c881b58669325bcf51df46
2020-06-05 10:39:05 -06:00
Egon Elbre
10f8b5492c Revert "private/tagsql: add finalizer based leak checks during dev"
This reverts commit c6310b34d2.

The change was causing data-races that are hard to deal with.

Change-Id: I0d29d85af70dce7ee2e967b9d7854719b32cf216
2020-06-05 17:52:46 +03:00
Yingrong Zhao
175f048aa7 scripts;cmd/storj-sim: include satellite node id in satellite address
Expose satellite ID from storj-sim so we can have access to it when
changing satellite address.

Change-Id: Ife816f4d35eae2d0bc9f9ad592fe75d73d93d9ff
2020-06-05 09:44:19 -04:00
Egon Elbre
34db4a80fd ci: fix staticcheck failures
Change-Id: I176fb24214755a1940a0a1a4e9cc8e39f184870b
2020-06-05 13:15:34 +00:00
Egon Elbre
0de1b5fa9f ci: fix golangci-lint failures
Change-Id: Ia8c4dd03439ce4e3f85890d45255b8ea1c94b50a
2020-06-05 12:55:35 +00:00
Yaroslav Vorobiov
09ca382abf storagenode/db: preflight improve index discovery
Change-Id: I876b321f6cd4e91dfced87aa4d39f2cf9a8e63d0
2020-06-05 14:03:25 +03:00
Yingrong Zhao
9a04ca0527 scripts/tests/rollingupgrade: skip v1.6.3
We removed the ability to change satellite address in for uplink cli v1.6.3. Therefore we will skip that version for now

Change-Id: I0f78cfe27b51fd6cad571636ba38266f5f672d58
2020-06-05 09:00:36 +00:00
paul cannon
5ed1985b22 docs/blueprints: trusted-delegated-repair.md
Trusted Delegated Repair is performing repair on trusted servers outside
the network boundary of the satellite.

Change-Id: I13b0e6f53100cefcb89c0c77bd1421c549551ab7
2020-06-04 18:22:25 +00:00
Qweder93
7f8e553022 console/dashboard: added pieces headers size to calculations
Change-Id: I0ee8d6bcb9ce9f69d49ebac2b95579166389668e
2020-06-04 16:39:02 +00:00
Michal Niewrzal
056ae7ffa8 scripts/test/rollingupgrade: set correct satellite address for imported
access

Addition: use always latest gateway release

Change-Id: I5e5231e6da4b6f7900cb71bb6e227901474270ea
2020-06-04 15:04:10 +00:00
Caleb Case
34ee3ef970
bump uplink to v1.0.7
Change-Id: Iab4ebded301b00bcf53c6dea012c35ce68eee8ba
2020-06-04 09:35:55 -04:00
Michal Niewrzal
2b2efcc662 satellite/payments/stripecoinpayments: move Coupons expiration date
sorting directly to listing method

Change-Id: I58d8a6ea1feba9ff2d19f21a1dbc87bfb8b49801
2020-06-04 09:47:42 +00:00
Michal Niewrzal
96286fde47 satellite/payments/stripecoinpayments: list projects by owner, not
by project members

This is a fix for listing the same project twice because project has
more than one member.

Change-Id: I3f6fe3456a6753d6d091a64436c22027dcbe2520
2020-06-04 08:42:01 +00:00
Yingrong Zhao
9d7713cdd0 script/testdata: update tracing agent default address
Change-Id: I730994f16f135c4b8643a52f4cf499487e4af326
2020-06-03 23:46:18 +00:00
Moby von Briesen
c8c0a42269 storagenode/orders: begin implementation of file store for order limits
* Will replace order limits database.
* This change adds functionality for storing and listing unsent orders.
* The next change will add functionality for order archival after
submission.

Change-Id: Ic5e2abc63991513245b6851a968ff2f2e18ce48d
2020-06-03 22:47:04 +00:00
NickolaiYurchenko
6b447a415b web/storagenode: free space calculation for chart fix
Change-Id: I4fb19b6ab8ba106dce4dfa49a03601c132ce66f0
2020-06-03 22:29:12 +00:00
Jeff Wendling
c6310b34d2 private/tagsql: add finalizer based leak checks during dev
what would win? thousands of man-hours spent trying to make
the best, most bug-free code possible, or one leaky boi?

this way we hopefully reduce the number of times we deadlock
everything by forgetting a single rows.Close.

Change-Id: I191727bbb75f74f5f4d0664e9e7b6ccf46c931f5
2020-06-03 15:06:58 -06:00
Jeff Wendling
254b42ff65 satellite/satellitedb: fix leaked rows from repairQueue.Insert
Change-Id: If5e62c49770f591ebe3f4d2dd4dd2658c229a022
2020-06-03 14:31:21 -06:00
Matt Robinson
eced8dcfec
build: Go 1.14.4 (#3904) 2020-06-03 17:35:35 +02:00
Michal Niewrzal
b20ced9519 satellite/satellitedb: drop project_id column from coupons table
This is last part of https://storjlabs.atlassian.net/browse/USR-818

Change-Id: I053d11b37df962c12e46645bae2fc2dad49c9755
2020-06-03 14:56:41 +00:00
Kaloyan Raev
fbfc3e5d18 satellite/payments: adjust label for bonus
This change adjusts the label for STORJ deposit bonuses in billing
history to be more consistent with other labels.

Change-Id: I5e7179ae3ac52dafb0dcef084e9a7c4742491f9e
2020-06-03 13:15:14 +00:00
Cameron Ayer
6a60e1e96b satellite/satellitedb: inclusive interval_start in GetAllocatedBandwidthTotal
The DB query in GetAllocatedBandwidthTotal uses an exclusive range:

'WHERE interval_start > ?'

The value that is used for this condition is the first day of current the month,
00:00:00 UTC.

By using the exclusive '>', we exclude the entire first hour of the month from the
result set.

Change-Id: I3ed300f5230c7514dc9495a85e8166213cd0842e
2020-06-02 13:06:45 -04:00
Bill Thorp
3aa3732b0d jenkins: Enable Cobertura failing for code coverage
Measure code coverage "by line" (Go actually measures by block, but whatever)
The '100, 0, 0' means anything above 100 auto-passes, anything below 0 auto-fails,
and anything below 0 is reported as unstable. autoupdateHealth, if I understand
correctly, will raise the functional auto-fail limit each time, so that a drop
in coverage will result in a failed test.  Finally failUnhealty is the trigger
which actually causes the build to fail, rather than simply reporting an error.

I have tested these changes using replay, but I was unable to verify 100% that
they work as designed.  The risks of having to revert this code seems less than
the cost of spending more time playing around with Jenkins locally..

Change-Id: Ica855b36aef7e1c3023fa80611229ca691017021
2020-06-02 16:00:08 +00:00
Egon Elbre
4d0cb1af7e storagenode/piecestore: verify before checking free disk
Change-Id: I3fe0383f9b13b99ef9d63ff235616ff204cf6d76
2020-06-02 17:49:14 +03:00
Egon Elbre
fca4f43a04 storage/filestore: benchmark diskInfoFromPath
Change-Id: I996057b1c650aec7cec84b49877d1e184a12514e
2020-06-02 17:49:14 +03:00
NickolaiYurchenko
18914e4d1a web/storagenode: months online calculations changed
Change-Id: I01d0ab5f9929a8cf2fca81adef43d9c979a18118
2020-06-02 17:09:14 +03:00
VitaliiShpital
c272872d5d satellite/payments: available coupon value feature
Change-Id: Ieae9385fbd917230298afff91a6be2838ad9b313
2020-06-02 10:00:45 +00:00
Michal Niewrzal
e8c4010311 satellite/metainfo: add missing error check
Change-Id: I4043633505a3eaee8304f71f5ddea17de2b3d10f
2020-06-02 09:38:55 +00:00
Jeff Wendling
2b3545c0c3 satellite/satellitedb: use delete returning to query pending_serial_queue
this way we don't have to do 2 steps, and by using the ctid, postgres
is going to do two very efficient prefix scans.

Change-Id: Ia9d0546cdf0a1af67ceec9cd508d336a5fdcbdb9
2020-06-01 15:43:33 -06:00
Moby von Briesen
b82d04e618 satellite/metainfo: limit size of uplink-provided metadata to 2KiB
Change-Id: Id44a46046ddb4a12102525531f4502fcff2b6252
2020-06-01 16:51:29 -04:00
Jeff Wendling
44433f38be satellite/satellitedb: remove ORDER BY when reading from queue
also remove the continuation support from the queue, otherwise
we may end up sequential scanning the entire table to get
a few rows at the end.

then, in the core, instead of looping both to get a big enough
batch inside of the queue, as well as outside of it to ensure
we consume the whole queue, just get a single batch at a time.

also, make the queue size configurable because we'll need to
do some tuning in production.

Change-Id: If1a997c6012898056ace89366a847c4cb141a025
2020-06-01 18:31:14 +00:00
Yingrong Zhao
163c027a6d satellite/satellitedb: remove monkit trace from convertDBNode
In jaeger, it shows that this function gets called repetitively in
a single request. Most of the time, it's less than 1ms. Therefore, it
doesn't add much value in our trace but create noises.

Change-Id: I20234f36bbcf0fc22f91e5e1a5634c0cad577ed0
2020-06-01 17:58:43 +00:00
Kaloyan Raev
d66e646b57 satellite/payments: add deposit bonus to stripe balance
Jira issue: https://storjlabs.atlassian.net/browse/USR-820

The bonus for depositing STORJ tokens is now added as to the Stripe
balance instead of the to `credits` DB table on the satellite.

Existing unspent bonuses in the `credits` DB table are still processed
as usual when generating invoices. They will be migrated to the Stripe
balance with a separate change.

The bonus is added to the Stripe balance with a separate Credit
transaction. The balance transactions for the deposit and the bonus can
be differentiate by their different description.

The billing history is modified to list the bonus from the Stripe
transactions list.

The workflow for depositing STORJ tokens to the Stripe balance is
improved to survive failures in the middle of the process.

Change-Id: I6a1017984eae34e97c580f9093f7e51ca417b962
2020-06-01 17:41:10 +00:00
Kaloyan Raev
948cc7333d satellite/payments: mark coupon as expired on its last month
Jira issue: https://storjlabs.atlassian.net/browse/USR-110

When generating invoices, if a coupon is not fully spent, but this is
its last valid month, it will be marked as expired in the database.

Change-Id: Ib1b2375f6703f9514d1ae089a387aa029b62d1fb
2020-06-01 17:10:00 +00:00
Qweder93
89c9672ce0 storagenode/piecestore: available storage check added in Upload
Change-Id: I71e9e5f335d4320d5de8b374fe747fec43179f78
2020-06-01 16:55:22 +00:00
Isaac Hess
df0ef7e0cd docs: update access-revocation blueprint
This update includes the plan for authorizing macaroon revocation
requests.

Change-Id: I859fa7c23f3bc1c8a92741df6f88187547613303
2020-06-01 16:33:13 +00:00
Natalie Villasana
e79e83b618 storage/cockroachkv: handle retry errors for GetAll and DeleteMultiple
It looks like GetAll and DeleteMultiple are only used in tests for now,
but they didn't have handling for retry errors returned from cockroach.
If they're used in prod in the future, now they will retry.

Change-Id: I0f281454ddebf282789142ff1d66a69bda5727c9
2020-06-01 16:13:43 +00:00
Fadila
36286a0629
docs/blueprints: installation and auto-update on Linux (#3463) 2020-06-01 18:05:24 +02:00
Michal Niewrzal
a9f6489663 satellite/payments/stripecoinpayments: remove ProjectID from Coupon
struct

This change is removing ProjectID from code. Next change will be about
dropping this colum from DB table.

Change-Id: Idb949e2829e2c304a2b6b011259c7cc7667082e1
2020-06-01 11:37:20 +00:00
Michal Niewrzal
1b69d20eb3 satellite/payments/stripecoinpayments: apply coupons in the order of
their expiration date

Change-Id: Ib013899d82715adf7b3002f2067d6481ceb59de2
2020-06-01 11:01:04 +00:00
Michal Niewrzal
21518bcc92 private/testuplink: move tests to uplink
Tests will be deleted from storj repo and added to uplink.

Change-Id: I298d852325c8eb0df07df38fd7e1345623addd8d
2020-06-01 12:29:21 +02:00
VitaliiShpital
ee9bb0d689 satellite/payments: coupon expiration bug fixed
Change-Id: Icc89e9ee6a1dd91109d34909490ee446b716e2ed
2020-06-01 12:20:08 +03:00
Michal Niewrzal
79a562c3ed cmd/uplink/cmd: improve uplink remove bucket command with force flag
* don't stop on single delete failure
* display number of successful and unsuccessful deletes

Change-Id: Id7f29055f250aad515e46622c2bfd3596055b93a
2020-06-01 07:56:14 +00:00
Jeff Wendling
839a6f15d1 stripecoinpayments: use fixed date for test
the test as written fails if it's the last day of the month because
the two tallies that are added span two different periods.

Change-Id: I294397278508035ce640500fc3b1b0ffd82b9b71
2020-06-01 09:02:52 +02:00
Michal Niewrzal
f6452e9c09 satellite/payments/stripecoinpayments: process customers instead of
projects

Currently, to generate invoices we are listing all projects. This is
problematic because we decided that elements like e.g. coupons should be
calculated per user. We want to have
more user oriented processing. With this change to prepare invoice
elements we are:
* listing Stripe customers
* listing projects for each customer
* processing projects to create project records
* calculating coupons per customer
* calculating credit spending per customer

Change-Id: I48b0063e44e4d301f97c87ecffb342649359968a
2020-05-30 13:16:07 +00:00
littleskunk
801a3ab90d
satellite/coinpayments: Reduce update interval to 2 minutes (#3897)
* satellite/coinpayments: Reduce update interval to 2 minutes

* satellite/coinpayments: Reduce balance update

Co-authored-by: paul cannon <thepaul@users.noreply.github.com>
2020-05-29 22:21:27 +02:00
VitaliiShpital
c9b9c686fc web/satellite: logic for new signup/login flow
WHAT:
1. updated verification page URL in config
2. added list of partnered satellites to config
3. added logic for satellites dropdown on new signup/login pages

WHY:
1. signup/login flow was reworked in tardigrade.io repo (iframe removed, new pages etc.)
2. new config flag was added to check if satellite name matches at least one member of partnered satellites list to redirect user to verification page
3. new pages will have dropdown with partnered satellites list. Appropriate logic was added.

Change-Id: I33399ab66ca31f07b297a433f6b1f41da4cb6e66
2020-05-29 17:11:44 +00:00